namespace ts {
    // branded string type used to store absolute, normalized and canonicalized paths
    // arbitrary file name can be converted to Path via toPath function
    export type Path = string & { __pathBrand: any };

    export interface TextRange {
        pos: number;
        end: number;
    }

    export type 转换词典语句令牌_ =
        | SyntaxKind.EndOfFileToken
        | SyntaxKind.WhitespaceTrivia
        | SyntaxKind.AtToken
        | SyntaxKind.OpenBraceToken
        | SyntaxKind.CloseBraceToken
        | SyntaxKind.CommaToken
        | SyntaxKind.ColonToken
        | SyntaxKind.Identifier
        | SyntaxKind.StringLiteral
        | SyntaxKind.井号令牌_
        | SyntaxKind.Unknown;


    export type JSDocSyntaxKind =
        | SyntaxKind.EndOfFileToken
        | SyntaxKind.WhitespaceTrivia
        | SyntaxKind.AtToken
        | SyntaxKind.NewLineTrivia
        | SyntaxKind.OpenBraceToken
        | SyntaxKind.CloseBraceToken
        | SyntaxKind.LessThanToken
        | SyntaxKind.GreaterThanToken
        | SyntaxKind.OpenBracketToken
        | SyntaxKind.CloseBracketToken
        | SyntaxKind.EqualsToken
        | SyntaxKind.CommaToken
        | SyntaxKind.DotToken
        | SyntaxKind.Identifier
        | SyntaxKind.BacktickToken
        | SyntaxKind.Unknown
        | KeywordSyntaxKind;

    export type KeywordSyntaxKind =
        | SyntaxKind.AnyKeyword
        | SyntaxKind.BooleanKeyword
        | SyntaxKind.BreakKeyword
        | SyntaxKind.CaseKeyword
        | SyntaxKind.构建关键字_
        | SyntaxKind.释放关键字_
        | SyntaxKind.只读关键字_
        | SyntaxKind.恒定关键字_
        | SyntaxKind.共享关键字_
        | SyntaxKind.ContinueKeyword
        | SyntaxKind.ConstKeyword
        | SyntaxKind.DebuggerKeyword
        | SyntaxKind.DefaultKeyword
        | SyntaxKind.DeleteKeyword
        | SyntaxKind.ElseKeyword
        | SyntaxKind.EnumKeyword
        | SyntaxKind.FalseKeyword
        | SyntaxKind.ForKeyword
        | SyntaxKind.FromKeyword
        | SyntaxKind.FunctionKeyword
        | SyntaxKind.IfKeyword
        | SyntaxKind.ImportKeyword
        | SyntaxKind.InterfaceKeyword
        | SyntaxKind.LetKeyword
        | SyntaxKind.NewKeyword
        | SyntaxKind.NullKeyword
        | SyntaxKind.ReturnKeyword
        | SyntaxKind.StringKeyword
        | SyntaxKind.文本8_
        | SyntaxKind.文本16_
        | SyntaxKind.文本32_
        | SyntaxKind.ThrowKeyword
        | SyntaxKind.TryKeyword
        | SyntaxKind.CatchKeyword
        | SyntaxKind.FinallyKeyword
        | SyntaxKind.程序关键字_
        | SyntaxKind.全局关键字_
        | SyntaxKind.原型关键字_
        | SyntaxKind.对象关键字_
        | SyntaxKind.结构关键字_
        | SyntaxKind.别名关键字_
        | SyntaxKind.延迟关键字_
        | SyntaxKind.执行关键字_
        | SyntaxKind.另如关键字_
        | SyntaxKind.启动关键字_
        | SyntaxKind.初始关键字_
        | SyntaxKind.方法关键字_
        | SyntaxKind.整数关键字_
        | SyntaxKind.正整数关键字_
        | SyntaxKind.小数关键字_
        | SyntaxKind.指针关键字_
        | SyntaxKind.正量关键字_
        | SyntaxKind.UnknownKeyword
        | SyntaxKind.未定关键字_
        | SyntaxKind.SwitchKeyword
        | SyntaxKind.ThisKeyword
        | SyntaxKind.基类关键字_
        | SyntaxKind.TrueKeyword
        | SyntaxKind.TypeKeyword
        | SyntaxKind.VoidKeyword
        | SyntaxKind.不及关键字_
        | SyntaxKind.指令关键字_
        | SyntaxKind.测试关键字_
        | SyntaxKind.断言关键字_
        | SyntaxKind.同步关键字_        
        | SyntaxKind.版本关键字_
        | SyntaxKind.OfKeyword
        | SyntaxKind.测试关键字_
        | SyntaxKind.整数8_
        | SyntaxKind.整数16_
        | SyntaxKind.整数32_
        | SyntaxKind.整数64_
        | SyntaxKind.正整数8_
        | SyntaxKind.正整数16_
        | SyntaxKind.正整数32_
        | SyntaxKind.正整数64_
        | SyntaxKind.小数32_
        | SyntaxKind.小数64_        
        | SyntaxKind.虚数32_
        | SyntaxKind.虚数64_
        | SyntaxKind.复数64_
        | SyntaxKind.复数128_
        | SyntaxKind.字符_
        | SyntaxKind.字符8_
        | SyntaxKind.字符16_
        | SyntaxKind.字符32_
        | SyntaxKind.字节_;

    // token > SyntaxKind.Identifier => token is a keyword
    // Also, If you add a new SyntaxKind be sure to keep the `Markers` section at the bottom in sync
    export const enum SyntaxKind {
        /** 未知 */
        Unknown,
        /** 文件结尾令牌 */
        EndOfFileToken,
        /** 单行注释杂项 */
        SingleLineCommentTrivia,
        /** 多行注释杂项 */
        MultiLineCommentTrivia,
        /** 新行杂项 */
        NewLineTrivia,
        /** 空白杂项 */
        WhitespaceTrivia,
        // We detect and preserve #! on the first line
        /** 指令杂项 */
        ShebangTrivia,
        // We detect and provide better error recovery when we encounter a git merge marker.  This
        // allows us to edit files with git-conflict markers in them in a much more pleasant manner.
        /** 冲突标记杂项 */
        ConflictMarkerTrivia,

        // Literals
        NumericLiteral,
        BigIntLiteral,
        StringLiteral,
        字符字面量_,
        RegularExpressionLiteral,
        NoSubstitutionTemplateLiteral,
        // Pseudo-literals
        TemplateHead,
        TemplateMiddle,
        TemplateTail,
        // Punctuation
        /** { */
        OpenBraceToken,
        /** } */
        CloseBraceToken,
        /** ( */
        OpenParenToken,
        /** ) */
        CloseParenToken,
        /** [ */
        OpenBracketToken,
        /** ] */
        CloseBracketToken,
        /** · */
        中点号_,
        /** . */
        DotToken,
        /** .[ */
        DotOpenBracketToken,
        /** ... */
        DotDotDotToken,
        /** .. */
        DotDotToken,
        /** ; */
        SemicolonToken,
        /** , */
        CommaToken,
        /** ?. */
        QuestionDotToken,
        /** < */
        LessThanToken,
        /** > */
        GreaterThanToken,
        /** <= */
        LessThanEqualsToken,
        /** \>= */
        GreaterThanEqualsToken,
        /** == */
        EqualsEqualsToken,
        /** != */
        ExclamationEqualsToken,

        /** => */
        EqualsGreaterThanToken,
        /** + */
        PlusToken,
        /** - */
        MinusToken,
        /** * */
        AsteriskToken,
        /** / */
        SlashToken,
        /** % */
        PercentToken,
        /** ++ */
        PlusPlusToken,
        /** -- */
        MinusMinusToken,
        /** << */
        LessThanLessThanToken,
        /** \>\> */
        GreaterThanGreaterThanToken,
        /** & */
        AmpersandToken,
        /** | */
        BarToken,
        /** ^ */
        CaretToken,
        /** ! */
        ExclamationToken,
        /** ~ */
        TildeToken,
        /** && */
        AmpersandAmpersandToken,
        /** || */
        BarBarToken,
        /** ? */
        QuestionToken,
        /** : */
        ColonToken,
        /** @ */
        AtToken,
        /** := */
        ColonEqualsToken,
        /** :> */
        ColonGreaterThanToken,
        /** -> */
        MinusGreaterThanToken,
        /** <- */
        LessThanMinusToken,
        /** # */
        井号令牌_,
        /** .< */
        点左尖号_,
        /** .( */
        点左括号_,

        /** //@ */
        输出转换词典头_,

        /** //# */
        输入转换词典头_,

        /** Only the JSDoc scanner produces BacktickToken. The normal scanner produces NoSubstitutionTemplateLiteral and related kinds. */
        /** ` */
        BacktickToken,
        // Assignments
        /** = */
        EqualsToken,
        /** += */
        PlusEqualsToken,
        /** -= */
        MinusEqualsToken,
        /** *= */
        AsteriskEqualsToken,
        /** /= */
        SlashEqualsToken,
        /** %= */
        PercentEqualsToken,        
        /** ~= */
        TildeEqualsToken,
        /** <<= */
        LessThanLessThanEqualsToken,
        /** \>\>= */
        GreaterThanGreaterThanEqualsToken,
        /** \>\>\>= */
        GreaterThanGreaterThanGreaterThanEqualsToken,
        /** &= */
        AmpersandEqualsToken,
        /** |= */
        BarEqualsToken,
        /** ^= */
        CaretEqualsToken,

        // Identifiers
        /** 标识符 */
        Identifier,
        // Reserved words
        断言关键字_,
        /** 跳出 */
        BreakKeyword,
        构建关键字_,
        释放关键字_,
        /** 常量 */
        ConstKeyword,
        恒定关键字_,
        只读关键字_,
        共享关键字_,
        /** 继续 */
        ContinueKeyword,
        /** 调试 */
        DebuggerKeyword,
        /** 默认 */
        DefaultKeyword,
        /** 删除 */
        DeleteKeyword,
        /** 否则 */
        ElseKeyword,
        /** 枚举 */
        EnumKeyword,
        /** 假 */
        FalseKeyword,
        /** 循环 */
        ForKeyword,
        /** 函数 */
        FunctionKeyword,
        /** 如果 */
        IfKeyword,
        /** 导入 */
        ImportKeyword,
        /** 新建 */
        NewKeyword,
        /** 若是 */
        CaseKeyword,
        /** 抛出 */
        ThrowKeyword,
        /** 尝试 */
        TryKeyword,
        /** 捕获 */
        CatchKeyword,
        /** 最终 */
        FinallyKeyword,
        全局关键字_,
        /** 对象 */
        对象关键字_,
        /** 结构 */
        结构关键字_,
        /** 别名 */
        别名关键字_,
        /** 延迟 */
        延迟关键字_,
        /** 执行 */
        执行关键字_,
        /** 另如 */
        另如关键字_,
        /** 程序 */
        程序关键字_,
        /** 启动 */
        启动关键字_,
        /** 初始 */
        初始关键字_,
        /** 方法 */
        方法关键字_,
        /** 整数 */
        整数关键字_,
        /** 正整数 */
        正整数关键字_,
        /** 小数 */
        小数关键字_,
        /** 大小 */
        正量关键字_,
        /** 指针 */
        指针关键字_,
        /** 选择 */
        选择关键字_,
        /** 原型 */
        原型关键字_,
        /** 未知关键字 */
        UnknownKeyword,
        未定关键字_,
        /** 空值 */
        NullKeyword,
        /** 返回 */
        ReturnKeyword,
        /** 假如 */
        SwitchKeyword,
        /** 本体 */
        ThisKeyword,
        基类关键字_,
        /** 真 */
        TrueKeyword,
        /** 无值 */
        VoidKeyword,
        /** 不及 */
        不及关键字_,
        // Strict mode reserved words
        /** 接口 */
        InterfaceKeyword,
        /** 通用 */
        AnyKeyword,
        /** 变量 */
        LetKeyword,
        // Contextual keywords
        /** 真假 */
        BooleanKeyword,
        /** 文字 */
        StringKeyword,
        /** 文字 */
        文本8_,
        /** 文字 */
        文本16_,
        /** 文字 */
        文本32_,
        /** 类型 */
        TypeKeyword,
        指令关键字_,
        汇编关键字_,
        测试关键字_,
        同步关键字_,
        版本关键字_,
        整数8_,
        整数16_,
        整数32_,
        整数64_,
        正整数8_,
        正整数16_,
        正整数32_,
        正整数64_,
        小数32_,
        小数64_,
        虚数32_,
        虚数64_,
        复数64_,
        复数128_,

        字符_,
        字符8_,
        字符16_,
        字符32_,
        字节_,
        /** 来自 */
        FromKeyword,

        /** 属于 */
        OfKeyword, // LastKeyword and LastToken and LastContextualKeyword

        // Parse tree nodes
        /** 限定名 */
        QualifiedName,

        // Signature elements
        /** 类型参数 */
        TypeParameter,
        /** 参数 */
        Parameter,

        // TypeMember
        /** 属性签名 */
        PropertySignature,
        /** 属性声明 */
        PropertyDeclaration,
        /** 方法签名 */
        MethodSignature,
        /** 调用签名 */
        CallSignature,        
        /** 构造签名 */
        ConstructSignature,

        /** 构造声明 */
        ConstructDeclaration,        
        /** 析构声明 */
        释放声明_,

        /** 内部方法声明 */
        内部方法声明_,
        /** 方法声明 */
        MethodDeclaration,
        // Type
        /** 类型引用 */
        TypeReference,
        静态二元表达式类型节点_,
        /** 类型谓词 */
        TypePredicate,
        /** 函数类型 */
        FunctionType,
        /** 类型字面量 */
        TypeLiteral,
        区间类型节点_,
        /** 数组类型 */
        ArrayType,
        /** 可选类型 */
        OptionalType,
        /** 联合类型 */
        UnionType,
        /** 交集类型 */
        IntersectionType,
        /** 括号类型 */
        ParenthesizedType,
        词典类型_,
        动态数组_,
        指针类型_,
        变长参数_,
        类型限定类型_,
        共享类型节点_,
        /** 字面量类型 */
        LiteralType,

        // Expression
        /** 数组字面量表达式 */
        ArrayLiteralExpression,
        词典键值表达式_,
        词典字面量表达式_,
        /* 动态数组表达式 */
        动态数组表达式_,
        /** 结构字面量表达式 */
        ObjectLiteralExpression,
        /** 属性访问表达式 */
        PropertyAccessExpression,
        /** 元素访问表达式 */
        ElementAccessExpression,
        截取表达式_,
        /** 调用表达式 */
        CallExpression,
        /** 新建表达式 */
        NewExpression,
        /** 类型断言表达式 */
        TypeAssertionExpression,
        类型查询表达式_,
        类型转换表达式_,
        /** 括号表达式 */
        ParenthesizedExpression,
        /** 函数表达式 */
        FunctionExpression,
        /** 箭头函数 */
        ArrowFunction,
        /** 前缀一元表达式 */
        PrefixUnaryExpression,
        /** 后缀一元表达式 */
        PostfixUnaryExpression,
        /** 二元表达式 */
        BinaryExpression,
        /** 条件表达式 */
        ConditionalExpression,
        /** 模板表达式 */
        TemplateExpression,
        /** 展开表达式 */
        SpreadElement,
        /** 省略表达式 */
        OmittedExpression,
        /** 表达式包括类型参数 */
        ExpressionWithTypeArguments,
        版本表达式语句_,
        /** 非空表达式 */
        NonNullExpression,
        /** 合成表达式 */
        SyntheticExpression,
        // Misc
        /** 模板跨度 */
        TemplateSpan,
        // Element
        /** 块 */
        Block,
        导入成员块_,
        导入从成员块_,
        /** 空语句 */
        EmptyStatement,
        /** 变量语句 */
        VariableStatement,
        /** 简洁变量语句_ */
        简洁变量语句_,
        /** 表达式语句 */
        ExpressionStatement,        
        /** 如果语句 */
        IfStatement,
        WhileStatement,
        /** 循环语句 */
        ForStatement,
        /** 循环属于语句 */
        ForOfStatement,
        /** 继续语句 */
        ContinueStatement,
        /** 跳出语句 */
        BreakStatement,
        /** 返回语句 */
        ReturnStatement,
        /** 假如语句 */
        SwitchStatement,
        /** 标签语句 */
        LabeledStatement,
        /** 延迟语句_ */
        延迟语句_,
        /* 删除语句 */
        删除语句_,
        /** 调试语句 */
        DebuggerStatement,
        /** 抛出语句 */
        ThrowStatement,
        /** 尝试语句 */
        TryStatement,
        /** 捕获子句 */
        CatchClause,
        /** 变量声明 */
        VariableDeclaration,
        /** 变量声明列表 */
        VariableDeclarationList,
        /** 函数声明 */
        FunctionDeclaration,
        /** 接口声明 */
        InterfaceDeclaration,
        /** 对象声明 */
        对象声明_,
         /** 结构声明 */
        结构声明_,
        /** 类型别名声明 */
        别名声明_,
        /** 类型声明 */
        类型声明_,
        /** 枚举声明 */
        EnumDeclaration,
        /** 若是块 */
        CaseBlock,
        程序声明_,
        /** 导入声明 */
        导入声明_,
        导入成员_,
        导入版本成员_,
        /** 导入从声明 */
        导入从声明_,
        导入从成员_,
        导入从版本成员_,
        来自子句_,
        /** 失踪声明 */
        MissingDeclaration,

        // Clauses
        /** 若是子句 */
        CaseClause,
        /** 默认子句 */
        DefaultClause,
        /** 继承子句 */
        HeritageClause,
        // Property assignments
        /** 属性赋值 */
        PropertyAssignment,
        /** 简洁属性赋值 */
        ShorthandPropertyAssignment,
        /** 展开赋值 */
        SpreadAssignment,
        指令语句_,
        测试单元语句_,
        同步语句_,
        断言语句_,
        版本语句_,
        转换词典语句_,
        转换词典表达式_,
        // Enum
        /** 枚举成员 */
        EnumMember,
        // Unparsed
        /** 不解析序言 */
        UnparsedPrologue,
        /** 不解析预置 */
        UnparsedPrepend,
        /** 不解析文本 */
        UnparsedText,
        /** 不解析内部文本 */
        UnparsedInternalText,
        /** 不解析合成引用 */
        UnparsedSyntheticReference,

        // Top-level nodes
        /** 源文件 */
        SourceFile,
        /** 源文件集合 */
        Bundle,
        模块_,
        /** 不解析源文件 */
        UnparsedSource,
        /** 输入文件组 */
        InputFiles,
        D_模块_,
        D_文件块_,
        D_缩进块_,
        D_模块名_,
        D_导入成员_,
        D_导入_,
        D_解构导入_,
        D_解构导入成员_,
        D_是表达式_,
        D_连接表达式_,
        D_转换表达式_,
        D_别名声明_,
        D_模板声明_,
        D_构造函数_,
        D_析构函数_,
        D_成员函数_,
        D_临时扩充节点_,
        D_goto语句_,
        D_类型判断表达式_,
        D_新建表达式_,
        D_字面量转换表达式_,
        D_函数指针表达式_,
        D_数组字面量表达式_,
        // JSDoc nodes
        JSDocTypeExpression,
        // The * type
        JSDocAllType,
        // The ? type
        JSDocUnknownType,
        JSDocNullableType,
        JSDocNonNullableType,
        JSDocOptionalType,
        JSDocFunctionType,
        JSDocVariadicType,
        // https://jsdoc.app/about-namepaths.html
        JSDocNamepathType,
        JSDocComment,
        JSDocTypeLiteral,
        JSDocSignature,
        JSDocTag,
        JSDocAugmentsTag,
        JSDocAuthorTag,
        JSDocCallbackTag,
        JSDocEnumTag,
        JSDocParameterTag,
        JSDocReturnTag,
        JSDocThisTag,
        JSDocTypeTag,
        JSDocTemplateTag,
        JSDocTypedefTag,
        JSDocPropertyTag,

        // Synthesized list
        /** 语法列表 */
        SyntaxList,

        // Transformation nodes
        /** 不输出语句 */
        NotEmittedStatement,
        /** 部分输出语句 */
        PartiallyEmittedExpression,
        /** 逗号列表表达式 */
        CommaListExpression,
        /** 合并声明标记 */
        MergeDeclarationMarker,
        /** 声明标记的结束 */
        EndOfDeclarationMarker,
        /** 合成引用表达式 */
        SyntheticReferenceExpression,
        /** dlang节点_ */
        DlangNode,

        // Enum value count
        /** 计数 */
        Count,

        // Markers
        /** 第一个赋值 */
        FirstAssignment = EqualsToken,
        /** 最后一个赋值 */
        LastAssignment = CaretEqualsToken,
        /** 第一个复合赋值 */
        FirstCompoundAssignment = PlusEqualsToken,
        /** 最后一个复合赋值 */
        LastCompoundAssignment = CaretEqualsToken,
        /** 第一个保留关键字 */
        FirstReservedWord = BreakKeyword,
        /** 最后一个保留关键字 */
        LastReservedWord = VoidKeyword,
        /** 第一个关键字 */
        FirstKeyword = BreakKeyword,
        /** 最后一个关键字 */
        LastKeyword = OfKeyword,
        /** 第一个类型节点 */
        FirstTypeNode = TypeReference,
        /** 最后一个类型节点 */
        LastTypeNode = LiteralType,
        /** 第一个运算符 */
        FirstPunctuation = OpenBraceToken,
        /** 最后一个运算符 */
        LastPunctuation = CaretEqualsToken,
        /** 第一个令牌 */
        FirstToken = Unknown,
        /** 最后一个令牌 */
        LastToken = LastKeyword,
        /** 第一个杂项令牌 */
        FirstTriviaToken = SingleLineCommentTrivia,
        /** 最后一个杂项令牌 */
        LastTriviaToken = ConflictMarkerTrivia,
        /** 第一字面量 */
        FirstLiteralToken = NumericLiteral,
        /** 最后一个字面量 */
        LastLiteralToken = NoSubstitutionTemplateLiteral,
        /** 第一个模板 */
        FirstTemplateToken = NoSubstitutionTemplateLiteral,
        /** 最后一个模板 */
        LastTemplateToken = TemplateTail,
        /** 第一个二元运算符 */
        FirstBinaryOperator = LessThanToken,
        /** 最后一个二元运算符 */
        LastBinaryOperator = CaretEqualsToken,
        /** 第一个语句 */
        FirstStatement = VariableStatement,
        /** 最后一个语句 */
        LastStatement = DebuggerStatement,
        /** 第一个节点 */
        FirstNode = QualifiedName,
        /** 第一个JSDoc表达式 */
        FirstJSDocNode = JSDocTypeExpression,
        /** 最后一个JSDoc表达式 */
        LastJSDocNode = JSDocPropertyTag,
        /** 第一个JSDoc标签节点 */
        FirstJSDocTagNode = JSDocTag,
        /** 最后一个JSDoc标签节点 */
        LastJSDocTagNode = JSDocPropertyTag,
        /** 第一个上下文关键字 */
        /* @internal */ FirstContextualKeyword = BooleanKeyword,
        /** 最后一个上下文关键字 */
        /* @internal */ LastContextualKeyword = OfKeyword,
    }

    export const enum NodeFlags {
        None = 0,
        Let = 1 << 0,  // Variable declaration
        Const = 1 << 1,  // Variable declaration
        Synthesized = 1 << 2,  // Node was synthesized during transformation
        OptionalChain = 1 << 3,  // Chained MemberExpression rooted to a pseudo-OptionalExpression
        ContainsThis = 1 << 4,  // Interface contains references to "this"
        HasImplicitReturn = 1 << 5,  // If function implicitly returns on one of codepaths (initialized by binding)
        HasExplicitReturn = 1 << 6,  // If function has explicit reachable return on one of codepaths (initialized by binding)
        是基类调用_ = 1 << 7,

        ThisNodeHasError = 1 << 8, // If the parser encountered an error when parsing the code that created this node
        ThisNodeOrAnySubNodesHasError = 1 << 9, // If this node or any of its children had an error
        HasAggregatedChildData = 1 << 10, // If we've computed data from children and cached it in this node
        允许方法签名上下文_ = 1 << 11,
        禁止方法签名上下文_ = 1 << 12,
        在取址表达式上下文_  = 1 << 13,
        共享_ = 1 << 14,
        // These flags will be set when the parser encounters a dynamic import expression or 'import.meta' to avoid
        // walking the tree if the flags are not set. However, these flags are just a approximation
        // (hence why it's named "PossiblyContainsDynamicImport") because once set, the flags never get cleared.
        // During editing, if a dynamic import is removed, incremental parsing will *NOT* clear this flag.
        // This means that the tree will always be traversed during module resolution, or when looking for external module indicators.
        // However, the removal operation should not occur often and in the case of the
        // removal, it is likely that users will add the import anyway.
        // The advantage of this approach is its simplicity. For the case of batch compilation,
        // we guarantee that users won't have to pay the price of walking the tree if a dynamic import isn't used.
        JSDoc = 1 << 15, // If node was parsed inside jsdoc
        /* @internal */ Ambient = 1 << 16, // If node was inside an ambient context -- a declaration file, or inside something with the `declare` modifier.
        JsonFile = 1 << 17, // If node was parsed in a Json
        允许属性签名上下文_ = 1 << 18,
        禁止属性签名上下文_ = 1 << 19,
        在静态真分支上下文_ = 1 << 20,
        类型查询上下文_ = 1 << 21,
        在继承条款上下文_ = 1 << 22,
        在返回值类型上下文_ = 1 << 23,
        简洁变量_ = 1 << 24,
        在版本验证上下文_ = 1 << 25,
        在假如语句上下文_ = 1 << 26,
        在循环语句上下文_ = 1 << 27,
        在测试单元上下文_ = 1 << 28,
        转换词典上下文_ = 1 << 29,

        BlockScoped = Let | Const,

        ReachabilityCheckFlags = HasImplicitReturn | HasExplicitReturn,
        ReachabilityAndEmitFlags = ReachabilityCheckFlags,

        // Parsing context flags
        ContextFlags = 在继承条款上下文_ | Ambient,
    }

    /* @internal */
    export const enum RelationComparisonResult {
        Succeeded = 1 << 0, // Should be truthy
        Failed = 1 << 1,
        Reported = 1 << 2,
        ReportsUnmeasurable = 1 << 3,
        ReportsUnreliable = 1 << 4,
        ReportsMask = ReportsUnmeasurable | ReportsUnreliable
    }

    export interface Node extends TextRange {
        kind: SyntaxKind;
        flags: NodeFlags;
        /* @internal */ 需要转换?: boolean;
        /* @internal */ 转换标志: 转换标志_;       // Flags for transforms, possibly undefined
        
        /* @internal */ 转换标志2: 转换标志2_;       // Flags for transforms, possibly undefined

        /* @internal */ id?: number;                          // Unique id (used to look up NodeLinks)
        parent: Node;                                         // Parent node (initialized by binding)
        /* @internal */ original?: Node;                      // The original node if this is an updated node.
        /* @internal */ symbol: Symbol;                       // Symbol declared by node (initialized by binding)
        /* @internal */ locals?: SymbolTable;                 // Locals associated with node (initialized by binding)
        /* @internal */ nextContainer?: Node;                 // Next container in declaration order (initialized by binding)
        /* @internal */ localSymbol?: Symbol;                 // Local symbol declared by node (initialized by binding only for exported nodes)
        /* @internal */ flowNode?: FlowNode;                  // Associated FlowNode (initialized by binding)
        /* @internal */ emitNode?: EmitNode;                  // Associated EmitNode (initialized by transforms)
        /* @internal */ contextualType?: Type;                // Used to temporarily assign a contextual type during overload resolution
        /* @internal */ inferenceContext?: InferenceContext;  // Inference context for contextual type
    }

    export interface JSDocContainer {
        /* @internal */ jsDoc?: JSDoc[];                      // JSDoc that directly precedes this node
        /* @internal */ dict?: 转换词典语句_[];                      // JSDoc that directly precedes this node
        /* @internal */ jsDocCache?: readonly JSDocTag[]; // Cache for getJSDocTags
    }

    export type HasJSDoc =
        | ParameterDeclaration
        | MethodSignature
        | PropertySignature        
        | ConstructSignatureDeclaration
        | ArrowFunction
        | ParenthesizedExpression
        | SpreadAssignment
        | ShorthandPropertyAssignment
        | PropertyAssignment
        | FunctionExpression
        | LabeledStatement
        | ExpressionStatement
        | VariableStatement
        | FunctionDeclaration
        | MethodDeclaration
        | PropertyDeclaration
        | InterfaceDeclaration
        | 别名声明节点_
        | 类型声明节点_
        | 对象声明_
        | 结构声明_
        | 简洁变量语句_
        | 导入从声明_
        | 程序声明_
        | 导入成员_
        | 导入声明_
        | 导入从成员_
        | 导入从声明_
        | EnumMember
        | EnumDeclaration
        | FunctionTypeNode
        | JSDocFunctionType
        | EndOfFileToken;

    export type HasDict =
        | ParameterDeclaration
        | MethodSignature
        | PropertySignature        
        | ConstructSignatureDeclaration
        | ArrowFunction
        | ParenthesizedExpression
        | SpreadAssignment
        | ShorthandPropertyAssignment
        | PropertyAssignment
        | FunctionExpression
        | LabeledStatement
        | ExpressionStatement
        | VariableStatement
        | FunctionDeclaration
        | MethodDeclaration
        | PropertyDeclaration
        | InterfaceDeclaration
        | 别名声明节点_
        | 类型声明节点_
        | 对象声明_
        | 结构声明_
        | 简洁变量语句_
        | 导入从声明_
        | 程序声明_
        | 导入成员_
        | 导入声明_
        | 导入从成员_
        | 导入从声明_
        | EnumMember
        | EnumDeclaration
        | FunctionTypeNode
        | EndOfFileToken;

    export type HasType =
        | SignatureDeclaration
        | VariableDeclaration
        | ParameterDeclaration
        | PropertySignature
        | PropertyDeclaration
        | ParenthesizedTypeNode
        | TypeAssertionExpression
        | 类型转换表达式_
        | 别名声明节点_
        | 类型声明节点_
        | 复合类型节点_
        | ObjectLiteralExpression
        | ArrayLiteralExpression
        | 动态数组表达式_
        | 词典字面量表达式_
        | JSDocTypeExpression
        | JSDocNonNullableType
        | JSDocNullableType
        | JSDocOptionalType
        | JSDocVariadicType;

    export type HasInitializer =
        | HasExpressionInitializer
        | ForStatement
        | ForOfStatement;

    export type HasExpressionInitializer =
        | VariableDeclaration
        | ParameterDeclaration
        | PropertySignature
        | PropertyDeclaration
        | PropertyAssignment
        | EnumMember;


    export type 程序集顶级语句_ =
        | NotEmittedStatement
        | VariableStatement
        | MethodDeclaration
        | FunctionDeclaration
        | 对象声明_
        | 结构声明_
        | InterfaceDeclaration
        | EnumDeclaration
        | 类型声明节点_
        | 别名声明节点_
        | 启动函数声明_
        | 初始函数声明_
        | MissingDeclaration
        | 指令语句_
        | 测试单元语句_
        | 断言语句_
        | 版本语句_
        | 版本表达式语句_
        | 转换词典语句_

    /* @internal */
    export type MutableNodeArray<T extends Node> = NodeArray<T> & T[];

    export interface NodeArray<T extends Node> extends ReadonlyArray<T>, TextRange {
        hasTrailingComma?: boolean;
        /* @internal */ 转换标志: 转换标志_;   // Flags for transforms, possibly undefined
    }

    export interface Token<TKind extends SyntaxKind> extends Node {
        kind: TKind;
    }

    export type DotToken = Token<SyntaxKind.DotToken>;
    export type DotDotDotToken = Token<SyntaxKind.DotDotDotToken>;
    export type QuestionToken = Token<SyntaxKind.QuestionToken>;
    export type QuestionDotToken = Token<SyntaxKind.QuestionDotToken>;
    export type ExclamationToken = Token<SyntaxKind.ExclamationToken>;
    export type ColonToken = Token<SyntaxKind.ColonToken>;
    export type EqualsToken = Token<SyntaxKind.EqualsToken>;
    export type AsteriskToken = Token<SyntaxKind.AsteriskToken>;
    export type EqualsGreaterThanToken = Token<SyntaxKind.EqualsGreaterThanToken>;
    export type EndOfFileToken = Token<SyntaxKind.EndOfFileToken> & JSDocContainer;
    export type PlusToken = Token<SyntaxKind.PlusToken>;
    export type MinusToken = Token<SyntaxKind.MinusToken>;
    
    export type 只读令牌_ = Token<SyntaxKind.只读关键字_>;
    
    export type 恒定令牌_ = Token<SyntaxKind.恒定关键字_>;

    export type 共享令牌_ = Token<SyntaxKind.共享关键字_>;

    /*@internal*/
    export const enum GeneratedIdentifierFlags {
        // Kinds
        None = 0,                           // Not automatically generated.
        Auto = 1,                           // Automatically generated identifier.
        Loop = 2,                           // Automatically generated identifier with a preference for '_i'.
        Unique = 3,                         // Unique name based on the 'text' property.
        Node = 4,                           // Unique name based on the node in the 'original' property.
        KindMask = 7,                       // Mask to extract the kind of identifier from its flags.

        // Flags
        ReservedInNestedScopes = 1 << 3,    // Reserve the generated name in nested scopes
        Optimistic = 1 << 4,                // First instance won't use '_#' if there's no conflict
        FileLevel = 1 << 5,                 // Use only the file identifiers list and not generated names to search for conflicts
    }

    export interface Identifier extends PrimaryExpression, Declaration {
        kind: SyntaxKind.Identifier;
        /**
         * Prefer to use `id.unescapedText`. (Note: This is available only in services, not internally to the TypeScript compiler.)
         * Text of identifier, but if the identifier begins with two underscores, this will begin with three.
         */
        escapedText: string;
        别名?: string;
        是私有的?: boolean;
        是空标识符?: boolean;
        originalKeywordKind?: SyntaxKind;                         // Original syntaxKind which get set so that we can report an error later
        /*@internal*/ autoGenerateFlags?: GeneratedIdentifierFlags; // Specifies whether to auto-generate the text for an identifier.
        /*@internal*/ autoGenerateId?: number;                    // Ensures unique generated identifiers get unique names, but clones get the same name.
        isInJSDocNamespace?: boolean;                             // if the node is a member in a JSDoc namespace
        /*@internal*/ typeArguments?: NodeArray<TypeNode | TypeParameterDeclaration>; // Only defined on synthesized nodes. Though not syntactically valid, used in emitting diagnostics, quickinfo, and signature help.
        /*@internal*/ jsdocDotPos?: number;                       // Identifier occurs in JSDoc-style generic: Id.<T>
    }

    // Transient identifier node (marked by id === -1)
    export interface TransientIdentifier extends Identifier {
        resolvedSymbol: Symbol;
    }

    /*@internal*/
    export interface GeneratedIdentifier extends Identifier {
        autoGenerateFlags: GeneratedIdentifierFlags;
    }

    export interface QualifiedName extends Node {
        kind: SyntaxKind.QualifiedName;
        left: EntityName;
        right: Identifier;
        /*@internal*/ jsdocDotPos?: number;                      // QualifiedName occurs in JSDoc-style generic: Id1.Id2.<T>
    }

    export type EntityName = Identifier | QualifiedName;

    export type PropertyName = Identifier | StringLiteral | NumericLiteral;

    export type DeclarationName =
        | Identifier
        | StringLiteralLike
        | NumericLiteral
        | ElementAccessExpression
        | EntityNameExpression;

    export interface Declaration extends Node {
        _declarationBrand: any;
    }

    export interface NamedDeclaration extends Declaration {
        修饰符?: NodeArray<Identifier>;
        name?: DeclarationName;
    }

    /* @internal */
    export interface LateBoundElementAccessExpression extends ElementAccessExpression {
        argumentExpression: EntityNameExpression;
    }

    export interface DeclarationStatement extends NamedDeclaration, Statement {
        name?: Identifier;
    }

    export interface ITtypeParameterDeclaration extends NamedDeclaration {
        kind: SyntaxKind.TypeParameter;
        name: Identifier;
    }

    export interface TypeParameterDeclaration extends NamedDeclaration {
        kind: SyntaxKind.TypeParameter;
        parent: DeclarationWithTypeParameterChildren;
        name: Identifier;
        /** Note: Consider calling `getEffectiveConstraintOfTypeParameter` */
        constraint?: TypeNode;
        default?: TypeNode;
        // For error recovery purposes.
        expression?: Expression;
    }

    export interface SignatureDeclarationBase extends NamedDeclaration, JSDocContainer {
        kind: SignatureDeclaration["kind"];
        name?: PropertyName;
        typeParameters?: NodeArray<TypeParameterDeclaration>;
        itypeParameters?: SymbolTable;
        parameters: NodeArray<ParameterDeclaration>;
        type?: TypeNode;
        /* @internal */ typeArguments?: NodeArray<TypeNode>; // Used for quick info, replaces typeParameters for instantiated signatures
    }

    export type SignatureDeclaration =
        | CallSignatureDeclaration
        | ConstructSignatureDeclaration
        | ConstructDeclaration
        | 释放声明_
        | MethodSignature
        | FunctionTypeNode
        | JSDocFunctionType
        | FunctionDeclaration
        | MethodDeclaration
        | 内部方法声明_
        | FunctionExpression
        | ArrowFunction
        ;

    export interface CallSignatureDeclaration extends SignatureDeclarationBase, TypeElement {
        kind: SyntaxKind.CallSignature;
    }

    export interface ConstructSignatureDeclaration extends SignatureDeclarationBase, TypeElement {
        kind: SyntaxKind.ConstructSignature;
    }

    export interface ConstructDeclaration extends SignatureDeclarationBase, TypeElement {
        kind: SyntaxKind.ConstructDeclaration;
        questionToken?: QuestionToken;
        exclamationToken?: ExclamationToken;
        body?: FunctionBody;
        /* @internal */ endFlowNode?: FlowNode;
        /* @internal */ returnFlowNode?: FlowNode;
    }

    export interface 释放声明_ extends SignatureDeclarationBase, TypeElement {
        kind: SyntaxKind.释放声明_;
        questionToken?: QuestionToken;
        exclamationToken?: ExclamationToken;
        body?: FunctionBody;
        /* @internal */ endFlowNode?: FlowNode;
    }

    export type BindingName = Identifier;

    export interface VariableDeclaration extends NamedDeclaration {
        kind: SyntaxKind.VariableDeclaration;
        parent: VariableDeclarationList;
        name: BindingName;                    // Declared variable name
        exclamationToken?: ExclamationToken;  // Optional definite assignment assertion
        type?: TypeNode;                      // Optional type annotation
        initializer?: Expression;             // Optional initializer 
        是全局变量?: boolean;
        限定符?: SyntaxKind.AmpersandToken;
    }

    export interface VariableDeclarationList extends Node {
        kind: SyntaxKind.VariableDeclarationList;
        parent: VariableStatement | ForStatement | ForOfStatement;
        declarations: NodeArray<VariableDeclaration>;
        是全局变量?:boolean
    }

    export interface ParameterDeclaration extends NamedDeclaration, JSDocContainer {
        kind: SyntaxKind.Parameter;
        parent: SignatureDeclaration;
        name: BindingName;                  // Declared parameter name.
        questionToken?: QuestionToken;      // Present on optional parameter
        type?: TypeNode;                    // Optional type annotation
        initializer?: Expression;           // Optional initializer
        限定符?: NodeArray<Token<SyntaxKind.AmpersandToken | SyntaxKind.AtToken>>
    }

    export interface PropertySignature extends TypeElement, JSDocContainer {
        kind: SyntaxKind.PropertySignature;
        parent: 对象声明_ | 结构声明_;
        name: PropertyName;                 // Declared property name
        questionToken?: QuestionToken;      // Present on optional property
        type?: TypeNode;                    // Optional type annotation
        initializer?: Expression;           // Optional initializer
    }

    export interface PropertyDeclaration extends TypeElement, JSDocContainer {
        kind: SyntaxKind.PropertyDeclaration;
        parent: 对象声明_ | 结构声明_| 类型声明节点_;
        name: PropertyName;
        questionToken?: QuestionToken;      // Present for use with reporting a grammar error
        exclamationToken?: ExclamationToken;
        type?: TypeNode;
        initializer?: Expression;           // Optional initializer
    }

    export interface ObjectLiteralElement extends NamedDeclaration {
        _objectLiteralBrand: any;
        name?: PropertyName;
    }

    /** Unlike ObjectLiteralElement, excludes JSXAttribute and JSXSpreadAttribute. */
    export type ObjectLiteralElementLike
        = PropertyAssignment
        | ShorthandPropertyAssignment
        ;

    export interface PropertyAssignment extends ObjectLiteralElement, JSDocContainer {
        parent: ObjectLiteralExpression;
        kind: SyntaxKind.PropertyAssignment;
        name: PropertyName;
        questionToken?: QuestionToken;
        initializer: Expression;
    }

    export interface ShorthandPropertyAssignment extends ObjectLiteralElement, JSDocContainer {
        parent: ObjectLiteralExpression;
        kind: SyntaxKind.ShorthandPropertyAssignment;
        name: Identifier;
        questionToken?: QuestionToken;
        exclamationToken?: ExclamationToken;
        // used when ObjectLiteralExpression is used in ObjectAssignmentPattern
        // it is grammar error to appear in actual object initializer
        equalsToken?: Token<SyntaxKind.EqualsToken>;
        objectAssignmentInitializer?: Expression;
    }

    export interface SpreadAssignment extends ObjectLiteralElement, JSDocContainer {
        parent: ObjectLiteralExpression;
        kind: SyntaxKind.SpreadAssignment;
        expression: Expression;
    }

    export type VariableLikeDeclaration =
        | VariableDeclaration
        | ParameterDeclaration
        | PropertyDeclaration
        | PropertyAssignment
        | PropertySignature
        | ShorthandPropertyAssignment
        | EnumMember
        | JSDocPropertyTag
        | JSDocParameterTag;

    export interface PropertyLikeDeclaration extends NamedDeclaration {
        name: PropertyName;
    }

    export type ArrayBindingElement = OmittedExpression;

    /**
     * Several node kinds share function-like features such as a signature,
     * a name, and a body. These nodes should extend FunctionLikeDeclarationBase.
     * Examples:
     * - FunctionDeclaration
     * - MethodDeclaration
     * - AccessorDeclaration
     */
    export interface FunctionLikeDeclarationBase extends SignatureDeclarationBase {
        _functionLikeDeclarationBrand: any;

        questionToken?: QuestionToken;
        exclamationToken?: ExclamationToken;
        body?: Block | Expression;
        /* @internal */ endFlowNode?: FlowNode;
    }

    export type FunctionLikeDeclaration =
        | FunctionDeclaration
        | MethodDeclaration
        | 内部方法声明_
        | FunctionExpression
        | ArrowFunction
        | ConstructDeclaration
        | 释放声明_
        ;

    /** @deprecated Use SignatureDeclaration */
    export type FunctionLike = SignatureDeclaration;

    export interface FunctionDeclaration extends FunctionLikeDeclarationBase, DeclarationStatement {
        kind: SyntaxKind.FunctionDeclaration;
        name?: Identifier;
        body?: FunctionBody;
    }

    export interface 启动函数声明_ extends FunctionDeclaration {
        是启动函数: boolean
    }

    export interface 初始函数声明_ extends FunctionDeclaration {
        是初始函数: boolean
    }

    export interface MethodSignature extends SignatureDeclarationBase, TypeElement {
        kind: SyntaxKind.MethodSignature;
        parent: ObjectTypeDeclaration;
        name: PropertyName;
    }

    // Note that a MethodDeclaration is considered both a ClassElement and an ObjectLiteralElement.
    // Both the grammars for ClassDeclaration and ObjectLiteralExpression allow for MethodDeclarations
    // as child elements, and so a MethodDeclaration satisfies both interfaces.  This avoids the
    // alternative where we would need separate kinds/types for ClassMethodDeclaration and
    // ObjectLiteralMethodDeclaration, which would look identical.
    //
    // Because of this, it may be necessary to determine what sort of MethodDeclaration you have
    // at later stages of the compiler pipeline.  In that case, you can either check the parent kind
    // of the method, or use helpers like isObjectLiteralMethodDeclaration
    export interface MethodDeclaration extends DeclarationStatement, FunctionLikeDeclarationBase, ObjectLiteralElement, JSDocContainer {
        kind: SyntaxKind.MethodDeclaration;
        parent: ObjectLiteralExpression;
        接受者: 接受者声明_;
        name: Identifier;
        body?: FunctionBody;
    }

    export interface 内部方法声明_ extends TypeElement, DeclarationStatement, FunctionLikeDeclarationBase, ObjectLiteralElement, JSDocContainer {
        kind: SyntaxKind.内部方法声明_;
        parent: 对象声明_ | 结构声明_ | 类型声明节点_;
        name: Identifier;
        body?: FunctionBody;
    }

    export interface 程序声明_ extends NamedDeclaration, DeclarationStatement, JSDocContainer {
        kind: SyntaxKind.程序声明_;
        是启动声明?: boolean;
        name: Identifier;
        statements: NodeArray<Statement>;
    }

    export interface D_模块名_ extends Statement {
        kind: SyntaxKind.D_模块名_;
        包名: Identifier
        模块名: Identifier
    }

    export interface D_导入成员_ extends Statement {
        kind: SyntaxKind.D_导入成员_;
        模块名: D_模块名_
        别名?: Identifier
        修饰符?: NodeArray<Identifier>
    }

    export interface D_模块_ extends Statement {
        kind: SyntaxKind.D_模块_;
        模块名: D_模块名_
        语句组: NodeArray<Statement>
    }

    export interface D_文件块_ extends Statement {
        kind: SyntaxKind.D_文件块_;
        语句组: NodeArray<Statement>
    }

    export interface D_缩进块_ extends Statement {
        kind: SyntaxKind.D_缩进块_;
        语句组: NodeArray<Statement>
    }

    export interface D_导入_ extends Statement {
        kind: SyntaxKind.D_导入_
        成员: NodeArray<D_导入成员_>
    }

    export interface D_解构导入_ extends Statement {
        kind: SyntaxKind.D_解构导入_
        模块名: D_模块名_
        解构导入组?: NodeArray<D_解构导入成员_>
    }

    export interface D_解构导入成员_ extends Expression {
        kind: SyntaxKind.D_解构导入成员_
        名称: Identifier
        别名?: Identifier
    }

    export interface D_是表达式_ extends Expression {
        kind: SyntaxKind.D_是表达式_
        表达式: Expression
    }

    export interface D_连接表达式_ extends Expression {
        kind: SyntaxKind.D_连接表达式_
        左侧: Expression
        右侧: Expression
    }

    export interface D_转换表达式_ extends Expression {
        kind: SyntaxKind.D_转换表达式_
        类型: TypeNode
        表达式: Expression
    }

    export interface D_成员函数_ extends Expression {
        kind: SyntaxKind.D_成员函数_
        name: Identifier;
        参数组: NodeArray<ParameterDeclaration>
        类型: TypeNode
        函数体: Block
    }

    export interface D_goto语句_ extends Statement{
        kind: SyntaxKind.D_goto语句_
        标签: Identifier
    }

    export interface D_类型判断表达式_ extends Expression{
        kind: SyntaxKind.D_类型判断表达式_
        左侧: Expression;
        右侧: Expression;
    }
    
    export interface D_新建表达式_ extends Expression{
        kind: SyntaxKind.D_新建表达式_
        表达式: Expression;
    }

    export interface D_字面量转换表达式_ extends Expression {
        kind: SyntaxKind.D_字面量转换表达式_
        表达式: Expression;
        语句: Block;
    }
    export interface D_函数指针表达式_ extends Expression {
        kind: SyntaxKind.D_函数指针表达式_
        表达式: Expression;
        typeArgs: NodeArray<TypeNode>;
    }

    export interface D_数组字面量表达式_ extends Expression {
        kind: SyntaxKind.D_数组字面量表达式_
        标签: NodeArray<Expression>
    }

    export interface D_临时扩充节点_ extends Node {
        kind: SyntaxKind.D_临时扩充节点_
        扩充节点组: NodeArray <Identifier>
        初始:  NodeArray <Identifier>
        类型名数组: NodeArray <Identifier>
    }

    export interface 导入成员_ extends NamedDeclaration, JSDocContainer {
        kind: SyntaxKind.导入成员_;
        parent: 导入声明_;
        别名?: Identifier;
        模块名: StringLiteral;
    }

    export interface 导入声明_ extends Statement, JSDocContainer {
        kind: SyntaxKind.导入声明_;
        导入组: NodeArray<导入成员_ | 导入版本成员_>;
        修饰符?: NodeArray<Identifier>
    }

    export interface 导入从成员_ extends NamedDeclaration, JSDocContainer {
        kind: SyntaxKind.导入从成员_;
        parent: 导入从声明_;
        name: Identifier;
        别名?: Identifier;
        修饰符?: NodeArray<Identifier>
    }

    export interface 导入从声明_ extends Statement, JSDocContainer {
        kind: SyntaxKind.导入从声明_;
        导入组: NodeArray<导入从成员_ | 导入从版本成员_>;
        模块名: StringLiteral;
    }

    export type 接受者声明_ = TypeNode;

    export type 类型限定符_ = 只读令牌_ | 恒定令牌_;

    export interface TypeNode extends Node {
        _typeNodeBrand: any;
    }

    export interface KeywordTypeNode extends TypeNode {
        kind:
        | SyntaxKind.UnknownKeyword
        | SyntaxKind.AnyKeyword
        | SyntaxKind.BooleanKeyword
        | SyntaxKind.StringKeyword
        | SyntaxKind.文本8_
        | SyntaxKind.文本16_
        | SyntaxKind.文本32_
        | SyntaxKind.VoidKeyword
        | SyntaxKind.未定关键字_
        | SyntaxKind.NullKeyword
        | SyntaxKind.TypeKeyword
        | SyntaxKind.版本关键字_
        | SyntaxKind.不及关键字_
        | SyntaxKind.指针关键字_
        | SyntaxKind.正量关键字_
        | SyntaxKind.整数关键字_
        | SyntaxKind.正整数关键字_
        | SyntaxKind.小数关键字_
        | SyntaxKind.整数8_
        | SyntaxKind.整数16_
        | SyntaxKind.整数32_
        | SyntaxKind.整数64_
        | SyntaxKind.正整数8_
        | SyntaxKind.正整数16_
        | SyntaxKind.正整数32_
        | SyntaxKind.正整数64_
        | SyntaxKind.小数32_
        | SyntaxKind.小数64_
        | SyntaxKind.虚数32_
        | SyntaxKind.虚数64_
        | SyntaxKind.复数64_
        | SyntaxKind.复数128_
        | SyntaxKind.字符_
        | SyntaxKind.字符8_
        | SyntaxKind.字符16_
        | SyntaxKind.字符32_
        | SyntaxKind.字节_
        ;
    }

    export interface FunctionTypeNodeBase extends TypeNode, SignatureDeclarationBase {
        kind: SyntaxKind.FunctionType;
        type: TypeNode;
    }

    export interface FunctionTypeNode extends FunctionTypeNodeBase {
        kind: SyntaxKind.FunctionType;
        是委托?: boolean
    }

    export interface NodeWithTypeArguments extends TypeNode {
        typeArguments?: NodeArray<TypeNode>;
    }

    export type TypeReferenceType = TypeReferenceNode | ExpressionWithTypeArguments;

    export interface TypeReferenceNode extends NodeWithTypeArguments {
        kind: SyntaxKind.TypeReference;
        typeName: EntityName;
    }

    export interface TypePredicateNode extends TypeNode {
        kind: SyntaxKind.TypePredicate;
        parameterName: Identifier;
        type?: TypeNode;
    }

    export type 复合类型节点_
        = 指针类型节点_
        | 动态数组类型节点_
        | 变长参数类型节点_
        | 类型限定符类型节点_

    export interface 变长参数类型节点_ extends TypeNode {
        kind: SyntaxKind.变长参数_;
        type: TypeNode;
    }

    
    export interface 共享类型节点_ extends TypeNode {
        kind: SyntaxKind.共享类型节点_;
        type: TypeNode;
    }

    export interface 类型限定符类型节点_ extends TypeNode {
        kind: SyntaxKind.类型限定类型_;
        限定符: 类型限定符_;
        type: TypeNode;
    }

    export interface 指针类型节点_ extends TypeNode {
        kind: SyntaxKind.指针类型_;
        type: TypeNode;
    }

    export interface 动态数组类型节点_ extends TypeNode {
        kind: SyntaxKind.动态数组_;
        type: TypeNode;
    }

    // A TypeLiteral is the declaration node for an anonymous symbol.
    export interface TypeLiteralNode extends TypeNode, Declaration {
        kind: SyntaxKind.TypeLiteral;
        type?: TypeNode;
        members: NodeArray<TypeElement>;
    }

    export interface 区间类型节点_ extends TypeNode {
        kind: SyntaxKind.区间类型节点_;
        开始?: LiteralTypeNode
        结束?: LiteralTypeNode
    }

    export interface ArrayTypeNode extends TypeNode {
        kind: SyntaxKind.ArrayType;
        elementType: TypeNode;
        长度?: TypeNode;
    }

    export interface 静态二元表达式类型节点_ extends TypeNode {
        kind: SyntaxKind.静态二元表达式类型节点_;
        left: TypeNode;
        operatorToken: BinaryOperatorToken;
        right: TypeNode;
    }

    export interface OptionalTypeNode extends TypeNode {
        kind: SyntaxKind.OptionalType;
        type: TypeNode;
    }

    export type UnionOrIntersectionTypeNode = UnionTypeNode | IntersectionTypeNode;

    export interface UnionTypeNode extends TypeNode {
        kind: SyntaxKind.UnionType;
        types: NodeArray<TypeNode>;
    }

    export interface IntersectionTypeNode extends TypeNode {
        kind: SyntaxKind.IntersectionType;
        types: NodeArray<TypeNode>;
    }

    export interface ParenthesizedTypeNode extends TypeNode {
        kind: SyntaxKind.ParenthesizedType;
        type: TypeNode;
    }

    export interface LiteralTypeNode extends TypeNode {
        kind: SyntaxKind.LiteralType;
        literal: BooleanLiteral | LiteralExpression | PrefixUnaryExpression;
    }

    export interface StringLiteral extends LiteralExpression, Declaration {
        kind: SyntaxKind.StringLiteral;
        /* @internal */ textSourceNode?: Identifier | StringLiteralLike | NumericLiteral; // Allows a StringLiteral to get its text from another node (used by transforms).
        /** Note: this is only set when synthesizing a node, not during parsing. */
        /* @internal */ singleQuote?: boolean;
        文本后缀: TokenFlags;
    }

    export interface 字符字面量_ extends LiteralExpression, Declaration {
        kind: SyntaxKind.字符字面量_;
        /* @internal */ textSourceNode?: Identifier | StringLiteralLike | NumericLiteral; // Allows a StringLiteral to get its text from another node (used by transforms).
        /** Note: this is only set when synthesizing a node, not during parsing. */
        /* @internal */ singleQuote?: boolean;
        文本后缀: TokenFlags;
    }


    export type StringLiteralLike = StringLiteral | 字符字面量_ | NoSubstitutionTemplateLiteral;

    // Note: 'brands' in our syntax nodes serve to give us a small amount of nominal typing.
    // Consider 'Expression'.  Without the brand, 'Expression' is actually no different
    // (structurally) than 'Node'.  Because of this you can pass any Node to a function that
    // takes an Expression without any error.  By using the 'brands' we ensure that the type
    // checker actually thinks you have something of the right type.  Note: the brands are
    // never actually given values.  At runtime they have zero cost.

    export interface Expression extends Node {
        _expressionBrand: any;
    }

    export interface OmittedExpression extends Expression {
        kind: SyntaxKind.OmittedExpression;
    }

    // Represents an expression that is elided as part of a transformation to emit comments on a
    // not-emitted node. The 'expression' property of a PartiallyEmittedExpression should be emitted.
    export interface PartiallyEmittedExpression extends LeftHandSideExpression {
        kind: SyntaxKind.PartiallyEmittedExpression;
        expression: Expression;
    }

    export interface UnaryExpression extends Expression {
        _unaryExpressionBrand: any;
    }

    /** Deprecated, please use UpdateExpression */
    export type IncrementExpression = UpdateExpression;
    export interface UpdateExpression extends UnaryExpression {
        _updateExpressionBrand: any;
    }

    // see: https://tc39.github.io/ecma262/#prod-UpdateExpression
    // see: https://tc39.github.io/ecma262/#prod-UnaryExpression
    export type PrefixUnaryOperator
        = SyntaxKind.PlusPlusToken
        | SyntaxKind.MinusMinusToken
        | SyntaxKind.PlusToken
        | SyntaxKind.MinusToken
        | SyntaxKind.TildeToken
        | SyntaxKind.ExclamationToken
        // 取值
        | SyntaxKind.AsteriskToken
        // 取址
        | SyntaxKind.AmpersandToken;

        /**
         * 前缀表达式
         */
    export interface PrefixUnaryExpression extends UpdateExpression {
        kind: SyntaxKind.PrefixUnaryExpression;
        operator: PrefixUnaryOperator;
        operand: UnaryExpression;
    }
    // see: https://tc39.github.io/ecma262/#prod-UpdateExpression
    export type PostfixUnaryOperator
        = SyntaxKind.PlusPlusToken
        | SyntaxKind.MinusMinusToken
        ;

        /**
         * 后缀表达式
         */
    export interface PostfixUnaryExpression extends UpdateExpression {
        kind: SyntaxKind.PostfixUnaryExpression;
        operand: LeftHandSideExpression;
        operator: PostfixUnaryOperator;
    }

    export interface LeftHandSideExpression extends UpdateExpression {
        _leftHandSideExpressionBrand: any;
    }

    export interface MemberExpression extends LeftHandSideExpression {
        _memberExpressionBrand: any;
    }

    export interface PrimaryExpression extends MemberExpression {
        _primaryExpressionBrand: any;
    }

    export interface NullLiteral extends PrimaryExpression, TypeNode {
        kind: SyntaxKind.NullKeyword;
    }

    export interface BooleanLiteral extends PrimaryExpression, TypeNode {
        kind: SyntaxKind.TrueKeyword | SyntaxKind.FalseKeyword;
    }

    export interface SyntheticExpression extends Expression {
        kind: SyntaxKind.SyntheticExpression;
        isSpread: boolean;
        type: Type;
    }

    // see: https://tc39.github.io/ecma262/#prod-MultiplicativeOperator
    export type MultiplicativeOperator
        = SyntaxKind.AsteriskToken
        | SyntaxKind.SlashToken
        | SyntaxKind.PercentToken
        ;

    // see: https://tc39.github.io/ecma262/#prod-MultiplicativeExpression
    export type MultiplicativeOperatorOrHigher
        = MultiplicativeOperator
        ;

    // see: https://tc39.github.io/ecma262/#prod-AdditiveExpression
    export type AdditiveOperator
        = SyntaxKind.PlusToken
        | SyntaxKind.MinusToken
        | SyntaxKind.TildeToken
        ;

    // see: https://tc39.github.io/ecma262/#prod-AdditiveExpression
    export type AdditiveOperatorOrHigher
        = MultiplicativeOperatorOrHigher
        | AdditiveOperator
        ;

    // see: https://tc39.github.io/ecma262/#prod-ShiftExpression
    export type ShiftOperator
        = SyntaxKind.LessThanLessThanToken
        | SyntaxKind.GreaterThanGreaterThanToken
        ;

    // see: https://tc39.github.io/ecma262/#prod-ShiftExpression
    export type ShiftOperatorOrHigher
        = AdditiveOperatorOrHigher
        | ShiftOperator
        ;

    // see: https://tc39.github.io/ecma262/#prod-RelationalExpression
    export type RelationalOperator
        = SyntaxKind.LessThanToken
        | SyntaxKind.LessThanEqualsToken
        | SyntaxKind.GreaterThanToken
        | SyntaxKind.GreaterThanEqualsToken
        ;

    // see: https://tc39.github.io/ecma262/#prod-RelationalExpression
    export type RelationalOperatorOrHigher
        = ShiftOperatorOrHigher
        | RelationalOperator
        ;

    // see: https://tc39.github.io/ecma262/#prod-EqualityExpression
    export type EqualityOperator
        = SyntaxKind.EqualsEqualsToken
        | SyntaxKind.ExclamationEqualsToken
        ;

    // see: https://tc39.github.io/ecma262/#prod-EqualityExpression
    export type EqualityOperatorOrHigher
        = RelationalOperatorOrHigher
        | EqualityOperator;

    // see: https://tc39.github.io/ecma262/#prod-BitwiseANDExpression
    // see: https://tc39.github.io/ecma262/#prod-BitwiseXORExpression
    // see: https://tc39.github.io/ecma262/#prod-BitwiseORExpression
    export type BitwiseOperator
        = SyntaxKind.AmpersandToken
        | SyntaxKind.BarToken
        | SyntaxKind.CaretToken
        ;

    // see: https://tc39.github.io/ecma262/#prod-BitwiseANDExpression
    // see: https://tc39.github.io/ecma262/#prod-BitwiseXORExpression
    // see: https://tc39.github.io/ecma262/#prod-BitwiseORExpression
    export type BitwiseOperatorOrHigher
        = EqualityOperatorOrHigher
        | BitwiseOperator
        ;

    // see: https://tc39.github.io/ecma262/#prod-LogicalANDExpression
    // see: https://tc39.github.io/ecma262/#prod-LogicalORExpression
    export type LogicalOperator
        = SyntaxKind.AmpersandAmpersandToken
        | SyntaxKind.BarBarToken
        ;

    // see: https://tc39.github.io/ecma262/#prod-LogicalANDExpression
    // see: https://tc39.github.io/ecma262/#prod-LogicalORExpression
    export type LogicalOperatorOrHigher
        = BitwiseOperatorOrHigher
        | LogicalOperator
        ;

    // see: https://tc39.github.io/ecma262/#prod-AssignmentOperator
    export type CompoundAssignmentOperator
        = SyntaxKind.PlusEqualsToken
        | SyntaxKind.MinusEqualsToken
        | SyntaxKind.AsteriskEqualsToken
        | SyntaxKind.SlashEqualsToken
        | SyntaxKind.PercentEqualsToken
        | SyntaxKind.AmpersandEqualsToken
        | SyntaxKind.BarEqualsToken
        | SyntaxKind.CaretEqualsToken
        | SyntaxKind.LessThanLessThanEqualsToken
        | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken
        | SyntaxKind.GreaterThanGreaterThanEqualsToken
        | SyntaxKind.TildeEqualsToken
        ;

    // see: https://tc39.github.io/ecma262/#prod-AssignmentExpression
    export type AssignmentOperator
        = SyntaxKind.EqualsToken
        | CompoundAssignmentOperator
        ;

    // see: https://tc39.github.io/ecma262/#prod-AssignmentExpression
    export type AssignmentOperatorOrHigher
        = LogicalOperatorOrHigher
        | AssignmentOperator
        ;

    // see: https://tc39.github.io/ecma262/#prod-Expression
    export type BinaryOperator
        = AssignmentOperatorOrHigher
        | SyntaxKind.CommaToken
        ;

    export type BinaryOperatorToken = Token<BinaryOperator>;

    export interface BinaryExpression extends Expression, Declaration {
        kind: SyntaxKind.BinaryExpression;
        left: Expression;
        operatorToken: BinaryOperatorToken;
        right: Expression;
    }

    export type AssignmentOperatorToken = Token<AssignmentOperator>;

    export interface AssignmentExpression<TOperator extends AssignmentOperatorToken> extends BinaryExpression {
        left: LeftHandSideExpression;
        operatorToken: TOperator;
    }

    export interface ObjectDestructuringAssignment extends AssignmentExpression<EqualsToken> {
        left: ObjectLiteralExpression;
    }

    export interface ArrayDestructuringAssignment extends AssignmentExpression<EqualsToken> {
        left: ArrayLiteralExpression;
    }

    export type DestructuringAssignment
        = ObjectDestructuringAssignment
        | ArrayDestructuringAssignment
        ;

    export type BindingOrAssignmentElement
        = VariableDeclaration
        | ParameterDeclaration
        | PropertyAssignment // AssignmentProperty
        | ShorthandPropertyAssignment // AssignmentProperty
        | SpreadAssignment // AssignmentRestProperty
        | OmittedExpression // Elision
        | SpreadElement // AssignmentRestElement
        | ArrayLiteralExpression // ArrayAssignmentPattern
        | ObjectLiteralExpression // ObjectAssignmentPattern
        | AssignmentExpression<EqualsToken> // AssignmentElement
        | Identifier // DestructuringAssignmentTarget
        | PropertyAccessExpression // DestructuringAssignmentTarget
        | ElementAccessExpression // DestructuringAssignmentTarget
        ;

    export type BindingOrAssignmentElementRestIndicator
        = DotDotDotToken // from BindingElement
        | SpreadElement // AssignmentRestElement
        | SpreadAssignment // AssignmentRestProperty
        ;

    export type BindingOrAssignmentElementTarget = BindingOrAssignmentPattern | Identifier | PropertyAccessExpression | ElementAccessExpression | OmittedExpression;

    export type ObjectBindingOrAssignmentPattern
        = ObjectLiteralExpression // ObjectAssignmentPattern
        ;

    export type ArrayBindingOrAssignmentPattern
        = ArrayLiteralExpression // ArrayAssignmentPattern
        ;

    export type AssignmentPattern = ObjectLiteralExpression | ArrayLiteralExpression;

    export type BindingOrAssignmentPattern = ObjectBindingOrAssignmentPattern | ArrayBindingOrAssignmentPattern;

    export interface ConditionalExpression extends Expression {
        kind: SyntaxKind.ConditionalExpression;
        condition: Expression;
        questionToken: QuestionToken;
        whenTrue: Expression;
        colonToken: ColonToken;
        whenFalse: Expression;
    }

    export type FunctionBody = Block;
    export type ConciseBody = FunctionBody | Expression;

    export interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclarationBase, JSDocContainer {
        kind: SyntaxKind.FunctionExpression;
        name?: Identifier;
        body: FunctionBody;  // Required, whereas the member inherited from FunctionDeclaration is optional
    }

    export interface ArrowFunction extends Expression, FunctionLikeDeclarationBase, JSDocContainer {
        kind: SyntaxKind.ArrowFunction;
        equalsGreaterThanToken: EqualsGreaterThanToken;
        body: ConciseBody;
        name: never;
    }

    // The text property of a LiteralExpression stores the interpreted value of the literal in text form. For a StringLiteral,
    // or any literal of a template, this means quotes have been removed and escapes have been converted to actual characters.
    // For a NumericLiteral, the stored value is the toString() representation of the number. For example 1, 1.00, and 1e0 are all stored as just "1".
    export interface LiteralLikeNode extends Node {
        text: string;
        别名?: string;
        isUnterminated?: boolean;
        hasExtendedUnicodeEscape?: boolean;
    }

    export interface TemplateLiteralLikeNode extends LiteralLikeNode {
        rawText?: string;
    }

    // The text property of a LiteralExpression stores the interpreted value of the literal in text form. For a StringLiteral,
    // or any literal of a template, this means quotes have been removed and escapes have been converted to actual characters.
    // For a NumericLiteral, the stored value is the toString() representation of the number. For example 1, 1.00, and 1e0 are all stored as just "1".
    export interface LiteralExpression extends LiteralLikeNode, PrimaryExpression {
        _literalExpressionBrand: any;
    }

    export interface RegularExpressionLiteral extends LiteralExpression {
        kind: SyntaxKind.RegularExpressionLiteral;
    }

    export interface NoSubstitutionTemplateLiteral extends LiteralExpression, TemplateLiteralLikeNode, Declaration {
        kind: SyntaxKind.NoSubstitutionTemplateLiteral;
        文本后缀: TokenFlags;
    }

    export const enum TokenFlags {
        None = 0,
        /* @internal */
        PrecedingLineBreak = 1 << 0,
        /* @internal */
        PrecedingJSDocComment = 1 << 1,
        /* @internal */
        Unterminated = 1 << 2,
        /* @internal */
        ExtendedUnicodeEscape = 1 << 3,
        Scientific = 1 << 4,        // e.g. `10e2`
        Octal = 1 << 5,             // e.g. `0777`
        HexSpecifier = 1 << 6,      // e.g. `0x00000000`
        BinarySpecifier = 1 << 7,   // e.g. `0b0110010000000000`
        OctalSpecifier = 1 << 8,    // e.g. `0o777`
        /* @internal */
        ContainsSeparator = 1 << 9, // e.g. `0b1100_0101`
        /* @internal */
        UnicodeEscape = 1 << 10,
        预处理开始_ = 1 << 11,
        预处理结束_ = 1 << 12,
        是空标识符_ = 1 << 13,
        是私有的_ = 1 << 14,
        是小数_ = 1 << 15,
        UL_ = 1 << 16,
        U_ = 1 << 17,
        L_ = 1 << 18,
        F_ = 1 << 19,
        FI_ = 1 << 20,
        I_ = 1 << 21,
        编译转换词典_ = 1 << 22,
        后缀c_ = 1 << 23,
        后缀w_ = 1 << 24,
        文本后缀标志_ = 后缀c_ | 后缀w_,
        /* @internal */
        BinaryOrOctalSpecifier = BinarySpecifier | OctalSpecifier,
        /* @internal */
        NumericLiteralFlags = Scientific | Octal | HexSpecifier | BinaryOrOctalSpecifier | ContainsSeparator | 是小数_ | UL_ | U_ | L_ | F_ | FI_ | I_
    }

    export interface NumericLiteral extends LiteralExpression, Declaration {
        kind: SyntaxKind.NumericLiteral;
        /* @internal */
        numericLiteralFlags: TokenFlags;
    }
    
    export interface BigIntLiteral extends LiteralExpression {
        kind: SyntaxKind.BigIntLiteral;
    }

    export interface TemplateHead extends TemplateLiteralLikeNode {
        kind: SyntaxKind.TemplateHead;
        parent: TemplateExpression;
    }

    export interface TemplateMiddle extends TemplateLiteralLikeNode {
        kind: SyntaxKind.TemplateMiddle;
        parent: TemplateSpan;
        文本后缀: TokenFlags;
    }

    export interface TemplateTail extends TemplateLiteralLikeNode {
        kind: SyntaxKind.TemplateTail;
        parent: TemplateSpan;
        文本后缀: TokenFlags;
    }

    export type TemplateLiteral = TemplateExpression | NoSubstitutionTemplateLiteral;

    export interface TemplateExpression extends PrimaryExpression {
        kind: SyntaxKind.TemplateExpression;
        head: TemplateHead;
        templateSpans: NodeArray<TemplateSpan>;
        文本后缀: TokenFlags;
    }

    // Each of these corresponds to a substitution expression and a template literal, in that order.
    // The template literal must have kind TemplateMiddleLiteral or TemplateTailLiteral.
    export interface TemplateSpan extends Node {
        kind: SyntaxKind.TemplateSpan;
        parent: TemplateExpression;
        expression: Expression;
        literal: TemplateMiddle | TemplateTail;
    }

    export interface ParenthesizedExpression extends PrimaryExpression, JSDocContainer {
        kind: SyntaxKind.ParenthesizedExpression;
        expression: Expression;
    }

    export interface ArrayLiteralExpression extends PrimaryExpression {
        kind: SyntaxKind.ArrayLiteralExpression;
        type: TypeNode;
        elements: NodeArray<Expression>;
        /* @internal */
        multiLine?: boolean;
    }

    export interface 动态数组表达式_ extends PrimaryExpression {
        kind: SyntaxKind.动态数组表达式_;
        type: TypeNode;
        elements: NodeArray<Expression>;
        /* @internal */
        multiLine?: boolean;
    }

    export interface SpreadElement extends Expression {
        kind: SyntaxKind.SpreadElement;
        parent: ArrayLiteralExpression | 动态数组表达式_ | CallExpression;
        expression: Expression;
    }

    /**
     * This interface is a base interface for ObjectLiteralExpression and JSXAttributes to extend from. JSXAttributes is similar to
     * ObjectLiteralExpression in that it contains array of properties; however, JSXAttributes' properties can only be
     * JSXAttribute or JSXSpreadAttribute. ObjectLiteralExpression, on the other hand, can only have properties of type
     * ObjectLiteralElement (e.g. PropertyAssignment, ShorthandPropertyAssignment etc.)
     */
    export interface ObjectLiteralExpressionBase<T extends ObjectLiteralElement> extends PrimaryExpression, Declaration {
        properties: NodeArray<T>;
    }

    // An ObjectLiteralExpression is the declaration node for an anonymous symbol.
    export interface ObjectLiteralExpression extends ObjectLiteralExpressionBase<ObjectLiteralElementLike> {
        kind: SyntaxKind.ObjectLiteralExpression;
        type: TypeReferenceNode;
        /* @internal */
        multiLine?: boolean;
    }

    export type EntityNameExpression = Identifier | PropertyAccessEntityNameExpression;
    export type EntityNameOrEntityNameExpression = EntityName | EntityNameExpression;

    /* @internal */
    export type AccessExpression = PropertyAccessExpression | ElementAccessExpression;

    export interface PropertyAccessExpression extends MemberExpression, NamedDeclaration {
        kind: SyntaxKind.PropertyAccessExpression;
        expression: LeftHandSideExpression;
        questionDotToken?: QuestionDotToken;
        name: Identifier;
    }

    export interface PropertyAccessChain extends PropertyAccessExpression {
        _optionalChainBrand: any;
    }

    /* @internal */
    export interface PropertyAccessChainRoot extends PropertyAccessChain {
        questionDotToken: QuestionDotToken;
    }

    /** Brand for a PropertyAccessExpression which, like a QualifiedName, consists of a sequence of identifiers separated by dots. */
    export interface PropertyAccessEntityNameExpression extends PropertyAccessExpression {
        _propertyAccessExpressionLikeQualifiedNameBrand?: any;
        expression: EntityNameExpression;
    }

    export interface 截取表达式_ extends PrimaryExpression {
        kind: SyntaxKind.截取表达式_;
        expression: Expression;
        开始?: Expression;
        结束?: Expression;
    }

    export interface ElementAccessExpression extends MemberExpression {
        kind: SyntaxKind.ElementAccessExpression;
        expression: LeftHandSideExpression;
        questionDotToken?: QuestionDotToken;
        argumentExpression: Expression;
    }

    export interface ElementAccessChain extends ElementAccessExpression {
        _optionalChainBrand: any;
    }

    /* @internal */
    export interface ElementAccessChainRoot extends ElementAccessChain {
        questionDotToken: QuestionDotToken;
    }

    export interface CallExpression extends LeftHandSideExpression, Declaration {
        kind: SyntaxKind.CallExpression;
        expression: LeftHandSideExpression;
        questionDotToken?: QuestionDotToken;
        typeArguments?: NodeArray<TypeNode>;
        arguments: NodeArray<Expression>;
    }

    export interface 词典键值表达式_ extends Expression {
        kind: SyntaxKind.词典键值表达式_
        键表达式: Expression
        值表达式: Expression
    }

    export interface 词典字面量表达式_ extends PrimaryExpression {
        kind: SyntaxKind.词典字面量表达式_;
        type: 词典类型节点_;
        elements: NodeArray<词典键值表达式_ | SpreadElement>;
        /* @internal */
        multiLine?: boolean;
    }

    export interface 词典类型节点_ extends TypeNode {
        kind: SyntaxKind.词典类型_
        键类型: TypeNode
        值类型: TypeNode
    }

    export interface CallChain extends CallExpression {
        _optionalChainBrand: any;
    }

    /* @internal */
    export interface CallChainRoot extends CallChain {
        questionDotToken: QuestionDotToken;
    }

    export type OptionalChain =
        | PropertyAccessChain
        | ElementAccessChain
        | CallChain
        ;

    /* @internal */
    export type OptionalChainRoot =
        | PropertyAccessChainRoot
        | ElementAccessChainRoot
        | CallChainRoot
        ;

    export interface ExpressionWithTypeArguments extends LeftHandSideExpression, NodeWithTypeArguments {
        kind: SyntaxKind.ExpressionWithTypeArguments;
        parent: HeritageClause | JSDocAugmentsTag;
        expression: LeftHandSideExpression;
    }

    export interface NewExpression extends PrimaryExpression, Declaration {
        kind: SyntaxKind.NewExpression;
        type: TypeNode;
        initExpression?: NodeArray<PropertyAssignment | Expression>
        解析签名?: Signature;
        解析的临时调用节点?: CallExpression;
    }

    export type CallLikeExpression = CallExpression;

    // <类型名称>表达式 || 类型名称.(表达式)

    // 下面几种转换表达式 那种好些
    // let x: MyInt = 10;
    // 1: as<int>(x) || 2: int.(x) || 3:  <int>x  || 4: x as int
    // 1: 模仿调用      || 2: 类似 构造  || 3: 好写       || 4: 语意明确

    // 目标类型 | 错误类型  = as<目标类型>(表达式)
    // 我就是想能 任意转 最多抛出错误
    
    // 如果(表达式 !is 错误类型){
    //     愿意干嘛干嘛
    // }



    export interface 类型转换表达式_ extends PrimaryExpression, UnaryExpression {
        kind: SyntaxKind.类型转换表达式_;
        type: TypeNode;
        expression: Expression;
    }

    // 类型断言表达式
    // ok, err := 表达式.<类型名称> // 表达式的基础类型必须是 通用型 或 联合类型
    export interface TypeAssertionExpression extends PrimaryExpression {
        kind: SyntaxKind.TypeAssertionExpression;
        type: TypeNode;
        expression: Expression;
    }

    /**
     * 表达式的基础类型必须是 通用型 或 联合类型
     * 联合类型 是 通用类型的 缩小版本
     * 通用型 是空接口类型 所有类型都实现了 通用型 接口
     * 
     * 联合类型 是 几个接口类型的组合 例如:  接口类型1 | 接口类型2 | 接口类型3
     * 联合类型的成员只能是接口类型
     * 
     * 参数尽量约束 接口类型, 不要访问类型的属性, 属性应通过方法来访问
     * 
     * 假如(表达式.<类型>){
     *     若是 XXX:
     *         ...     // 默认具有 跳出
     *     若是 xxx:
     *         ...     // 默认具有 跳出
     * }
     */
    export interface 类型查询表达式_ extends PrimaryExpression {
        kind: SyntaxKind.类型查询表达式_;
        type: TypeNode;
        expression: Expression;
    }

    export type AssertionExpression = TypeAssertionExpression | 类型转换表达式_;

    export interface NonNullExpression extends LeftHandSideExpression {
        kind: SyntaxKind.NonNullExpression;
        expression: Expression;
    }

    export interface Statement extends Node {
        _statementBrand: any;
    }

    // Represents a statement that is elided as part of a transformation to emit comments on a
    // not-emitted node.
    export interface NotEmittedStatement extends Statement {
        kind: SyntaxKind.NotEmittedStatement;
    }

    /**
     * Marks the end of transformed declaration to properly emit exports.
     */
    /* @internal */
    export interface EndOfDeclarationMarker extends Statement {
        kind: SyntaxKind.EndOfDeclarationMarker;
    }

    /**
     * A list of comma-separated expressions. This node is only created by transformations.
     */
    export interface CommaListExpression extends Expression {
        kind: SyntaxKind.CommaListExpression;
        elements: NodeArray<Expression>;
    }

    /**
     * Marks the beginning of a merged transformed declaration.
     */
    /* @internal */
    export interface MergeDeclarationMarker extends Statement {
        kind: SyntaxKind.MergeDeclarationMarker;
    }

    /* @internal */
    export interface SyntheticReferenceExpression extends LeftHandSideExpression {
        kind: SyntaxKind.SyntheticReferenceExpression;
        expression: Expression;
        thisArg: Expression;
    }

    export interface EmptyStatement extends Statement {
        kind: SyntaxKind.EmptyStatement;
    }

    export interface DebuggerStatement extends Statement {
        kind: SyntaxKind.DebuggerStatement;
    }

    export interface 指令语句_ extends Statement {
        kind: SyntaxKind.指令语句_;
        参数: StringLiteral,
    }

    export interface 测试单元语句_ extends Statement {
        kind: SyntaxKind.测试单元语句_;
        是有效的?: boolean;
        版本容器块种类?: 版本容器块种类_;
        版本语句路径?: string;
        statements: NodeArray<Statement>,
    }

    export interface 同步语句_ extends Statement {
        kind: SyntaxKind.同步语句_;
        arguments?: NodeArray<Expression>;
        statements: NodeArray<Statement>,
    }

    export interface 断言语句_ extends Statement {
        kind: SyntaxKind.断言语句_;
        arguments: NodeArray<Expression>;
        是静态?: boolean
    }

    export interface 转换词典表达式_ extends Statement, Declaration {
        kind: SyntaxKind.转换词典语句_;
        键: Identifier | StringLiteral;
        值: Identifier | StringLiteral;
    }

    export interface 转换词典语句_ extends Statement {
        kind: SyntaxKind.转换词典语句_;
        种类: SyntaxKind.输入转换词典头_ | SyntaxKind.输出转换词典头_;
        标识: Identifier;
        elements: NodeArray<转换词典表达式_>;
    }

    export interface MissingDeclaration extends DeclarationStatement {
        kind: SyntaxKind.MissingDeclaration;
        name?: Identifier;
    }

    export type BlockLike = SourceFile | Block | CaseOrDefaultClause;

    export const enum 版本容器块种类_ {
        无_ = 0,
        是版本容器块_ = 1 << 0,
        是版本另如容器块_ = 1 << 1,
        是版本否则容器块_ = 1 << 2,
        是测试单元_ = 1 << 3,
    }

    export interface Block extends Statement {
        kind: SyntaxKind.Block;
        statements: NodeArray<Statement>;
        /*@internal*/ multiLine?: boolean;
        版本容器块种类?: 版本容器块种类_;
        是有效的?: boolean;
        版本语句路径?: string;
    }

    export interface VariableStatement extends Statement, JSDocContainer {
        kind: SyntaxKind.VariableStatement;
        declarationList: VariableDeclarationList;
        是全局变量: boolean
    }

    export interface ExpressionStatement extends Statement, JSDocContainer {
        kind: SyntaxKind.ExpressionStatement;
        expression: Expression;
    }

    /* @internal */
    export interface PrologueDirective extends ExpressionStatement {
        expression: StringLiteral;
    }

    export interface IfStatement extends Statement {
        kind: SyntaxKind.IfStatement;
        expression: Expression;
        thenStatement: Statement;
        elseStatement?: Statement;
        修饰符?: NodeArray<Identifier>;
        是静态的?: boolean;
    }

    export interface 版本表达式语句_ extends Statement, Declaration{
        kind: SyntaxKind.版本表达式语句_;
        expression: Identifier;
    }
    
    export interface 版本语句_ extends Statement {
        kind: SyntaxKind.版本语句_;
        expression: Identifier;
        是顶级的: boolean;
        thenStatement: Block;
        elseStatement?: Statement;
    }

    export interface 导入成员块_ extends Node {
        kind: SyntaxKind.导入成员块_;
        statements: NodeArray<导入成员_ | 导入版本成员_>;
        /*@internal*/ multiLine?: boolean;
        版本容器块种类?: 版本容器块种类_;
        是有效的?: boolean;
        版本语句路径?: string;
    }

    export interface 导入从成员块_ extends Node {
        kind: SyntaxKind.导入从成员块_;
        statements: NodeArray<导入从成员_ | 导入从版本成员_>;
        /*@internal*/ multiLine?: boolean;
        版本容器块种类?: 版本容器块种类_;
        是有效的?: boolean;
        版本语句路径?: string;
    }

    export interface 导入从版本成员_ extends Node, JSDocContainer {
        kind: SyntaxKind.导入从版本成员_;
        expression: Identifier;
        是顶级的: boolean;
        thenStatement: 导入从成员块_;
        elseStatement?: 导入从成员块_ | 导入从版本成员_;
    }

    export interface 导入版本成员_ extends Node, JSDocContainer {
        kind: SyntaxKind.导入版本成员_;
        expression: Identifier;
        是顶级的: boolean;
        thenStatement: 导入成员块_;
        elseStatement?: 导入成员块_ | 导入版本成员_ ;
    }

    export interface 延迟语句_ extends Statement {
        kind: SyntaxKind.延迟语句_
        expression: Expression
    }

    export interface 简洁变量语句_ extends Expression, Statement, JSDocContainer {
        kind: SyntaxKind.简洁变量语句_;
        declarations: NodeArray<VariableDeclaration>
        initializers: NodeArray<Expression>
    }

    export interface IterationStatement extends Statement {
        statement: Statement;
    }

    export interface WhileStatement extends IterationStatement {
        kind: SyntaxKind.WhileStatement;
        expression?: Expression;
    }

    export type ForInitializer = VariableDeclarationList | Expression;

    export interface ForStatement extends IterationStatement {
        kind: SyntaxKind.ForStatement;
        initializer?: ForInitializer;
        condition?: Expression;
        incrementor?: Expression;
    }

    export type ForInOrOfStatement = ForOfStatement;

    export interface ForOfStatement extends IterationStatement {
        kind: SyntaxKind.ForOfStatement;
        initializer: ForInitializer;
        expression: Expression;
    }

    export interface BreakStatement extends Statement {
        kind: SyntaxKind.BreakStatement;
        label?: Identifier;
    }

    export interface 删除语句_ extends Statement {
        kind: SyntaxKind.删除语句_;
        expression: Expression
    }

    export interface ContinueStatement extends Statement {
        kind: SyntaxKind.ContinueStatement;
        label?: Identifier;
    }

    export type BreakOrContinueStatement = BreakStatement | ContinueStatement;

    export interface ReturnStatement extends Statement {
        kind: SyntaxKind.ReturnStatement;
        expression?: Expression;
    }

    export interface SwitchStatement extends Statement {
        kind: SyntaxKind.SwitchStatement;
        expression: Expression;
        caseBlock: CaseBlock;
        possiblyExhaustive?: boolean;
    }

    export interface CaseBlock extends Node {
        kind: SyntaxKind.CaseBlock;
        parent: SwitchStatement;
        clauses: NodeArray<CaseOrDefaultClause>;
    }

    export interface CaseClause extends Node {
        kind: SyntaxKind.CaseClause;
        parent: CaseBlock;
        expression: Expression | TypeNode;
        statements: NodeArray<Statement>;
        /* @internal */ fallthroughFlowNode?: FlowNode;
    }

    export interface DefaultClause extends Node {
        kind: SyntaxKind.DefaultClause;
        parent: CaseBlock;
        statements: NodeArray<Statement>;
        /* @internal */ fallthroughFlowNode?: FlowNode;
    }

    export type CaseOrDefaultClause = CaseClause | DefaultClause;

    export interface LabeledStatement extends Statement, JSDocContainer {
        kind: SyntaxKind.LabeledStatement;
        label: Identifier;
        statement: Statement;
    }

    export interface ThrowStatement extends Statement {
        kind: SyntaxKind.ThrowStatement;
        expression?: Expression;
    }

    export interface TryStatement extends Statement {
        kind: SyntaxKind.TryStatement;
        tryBlock: Block;
        catchClause?: CatchClause;
        finallyBlock?: Block;
    }

    export interface CatchClause extends Node {
        kind: SyntaxKind.CatchClause;
        parent: TryStatement;
        variableDeclaration?: VariableDeclaration;
        block: Block;
    }

    export type ObjectTypeDeclaration = InterfaceDeclaration | 类型声明节点_ | TypeLiteralNode;

    export type DeclarationWithTypeParameters = DeclarationWithTypeParameterChildren | JSDocTypedefTag | JSDocCallbackTag | JSDocSignature;
    export type DeclarationWithTypeParameterChildren = SignatureDeclaration | 对象声明_ | 结构声明_ | 类型声明节点_ | InterfaceDeclaration | 别名声明节点_ | JSDocTemplateTag;

    export interface TypeElement extends NamedDeclaration {
        _typeElementBrand: any;
        name?: PropertyName;
        questionToken?: QuestionToken;
    }

    export interface InterfaceDeclaration extends DeclarationStatement, JSDocContainer {
        kind: SyntaxKind.InterfaceDeclaration;
        name: Identifier;
        typeParameters?: NodeArray<TypeParameterDeclaration>;
        itypeParameters?: SymbolTable;
        heritageClauses?: NodeArray<HeritageClause>;
        members: NodeArray<TypeElement>;
    }

    export interface 对象声明_ extends DeclarationStatement, JSDocContainer {
        kind: SyntaxKind.对象声明_;
        name: Identifier;
        typeParameters?: NodeArray<TypeParameterDeclaration>;
        itypeParameters?: SymbolTable;
        heritageClauses?: NodeArray<HeritageClause>;
        members: NodeArray<TypeElement>;
    }

    export interface 结构声明_ extends DeclarationStatement, JSDocContainer {
        kind: SyntaxKind.结构声明_;
        name: Identifier;
        typeParameters?: NodeArray<TypeParameterDeclaration>;
        itypeParameters?: SymbolTable;
        members: NodeArray<TypeElement>;
    }

    export interface HeritageClause extends Node {
        kind: SyntaxKind.HeritageClause;
        parent: InterfaceDeclaration | 对象声明_;
        token: SyntaxKind.ColonToken;
        types: NodeArray<ExpressionWithTypeArguments>;
    }

    export interface 别名声明节点_ extends DeclarationStatement, JSDocContainer {
        kind: SyntaxKind.别名声明_;
        name: Identifier;
        typeParameters?: NodeArray<TypeParameterDeclaration>;
        itypeParameters?: SymbolTable;
        type: TypeNode;
    }

    export interface 类型声明节点_ extends DeclarationStatement, TypeNode, JSDocContainer {
        kind: SyntaxKind.类型声明_
        name: Identifier
        typeParameters?: NodeArray<TypeParameterDeclaration>;
        itypeParameters?: SymbolTable;
        type: TypeNode;
        members?: NodeArray<内部方法声明_>;
    }

    export interface EnumMember extends NamedDeclaration, JSDocContainer {
        kind: SyntaxKind.EnumMember;
        parent: EnumDeclaration;
        // This does include ComputedPropertyName, but the parser will give an error
        // if it parses a ComputedPropertyName in an EnumMember
        name: PropertyName;
        initializer?: Expression;
    }

    export interface EnumDeclaration extends DeclarationStatement, JSDocContainer {
        kind: SyntaxKind.EnumDeclaration;
        name: Identifier;
        members: NodeArray<EnumMember>;
    }

    export type ModuleName = Identifier | StringLiteral;

    export type ModuleBody = NamespaceBody;

    export type NamespaceBody = NamespaceDeclaration;

    export interface NamespaceDeclaration extends NamedDeclaration {
        name: Identifier;
        body: NamespaceBody;
    }

    export type ModuleReference = EntityName;


    export interface CheckJsDirective extends TextRange {
        enabled: boolean;
    }

    export type CommentKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia;

    export interface CommentRange extends TextRange {
        hasTrailingNewLine?: boolean;
        kind: CommentKind;
    }

    export interface SynthesizedComment extends CommentRange {
        text: string;
        pos: -1;
        end: -1;
    }

    // represents a top level: { type } expression in a JSDoc comment.
    export interface JSDocTypeExpression extends TypeNode {
        kind: SyntaxKind.JSDocTypeExpression;
        type: TypeNode;
    }

    export interface JSDocType extends TypeNode {
        _jsDocTypeBrand: any;
    }

    export interface JSDocAllType extends JSDocType {
        kind: SyntaxKind.JSDocAllType;
    }

    export interface JSDocUnknownType extends JSDocType {
        kind: SyntaxKind.JSDocUnknownType;
    }

    export interface JSDocNonNullableType extends JSDocType {
        kind: SyntaxKind.JSDocNonNullableType;
        type: TypeNode;
    }

    export interface JSDocNullableType extends JSDocType {
        kind: SyntaxKind.JSDocNullableType;
        type: TypeNode;
    }

    export interface JSDocOptionalType extends JSDocType {
        kind: SyntaxKind.JSDocOptionalType;
        type: TypeNode;
    }

    export interface JSDocFunctionType extends JSDocType, SignatureDeclarationBase {
        kind: SyntaxKind.JSDocFunctionType;
    }

    export interface JSDocVariadicType extends JSDocType {
        kind: SyntaxKind.JSDocVariadicType;
        type: TypeNode;
    }

    export interface JSDocNamepathType extends JSDocType {
        kind: SyntaxKind.JSDocNamepathType;
        type: TypeNode;
    }

    export type JSDocTypeReferencingNode = JSDocVariadicType | JSDocOptionalType | JSDocNullableType | JSDocNonNullableType;

    export interface JSDoc extends Node {
        kind: SyntaxKind.JSDocComment;
        parent: HasJSDoc;
        tags?: NodeArray<JSDocTag>;
        comment?: string;
    }

    export interface JSDocTag extends Node {
        parent: JSDoc | JSDocTypeLiteral;
        tagName: Identifier;
        comment?: string;
    }

    export interface JSDocUnknownTag extends JSDocTag {
        kind: SyntaxKind.JSDocTag;
    }

    /**
     * Note that `@extends` is a synonym of `@augments`.
     * Both tags are represented by this interface.
     */
    export interface JSDocAugmentsTag extends JSDocTag {
        kind: SyntaxKind.JSDocAugmentsTag;
        class: ExpressionWithTypeArguments & { expression: Identifier | PropertyAccessEntityNameExpression };
    }

    export interface JSDocAuthorTag extends JSDocTag {
        kind: SyntaxKind.JSDocAuthorTag;
    }

    export interface JSDocEnumTag extends JSDocTag, Declaration {
        parent: JSDoc;
        kind: SyntaxKind.JSDocEnumTag;
        typeExpression?: JSDocTypeExpression;
    }

    export interface JSDocThisTag extends JSDocTag {
        kind: SyntaxKind.JSDocThisTag;
        typeExpression?: JSDocTypeExpression;
    }

    export interface JSDocTemplateTag extends JSDocTag {
        kind: SyntaxKind.JSDocTemplateTag;
        constraint: JSDocTypeExpression | undefined;
        typeParameters: NodeArray<TypeParameterDeclaration>;
    }

    export interface JSDocReturnTag extends JSDocTag {
        kind: SyntaxKind.JSDocReturnTag;
        typeExpression?: JSDocTypeExpression;
    }

    export interface JSDocTypeTag extends JSDocTag {
        kind: SyntaxKind.JSDocTypeTag;
        typeExpression: JSDocTypeExpression;
    }

    export interface JSDocTypedefTag extends JSDocTag, NamedDeclaration {
        parent: JSDoc;
        kind: SyntaxKind.JSDocTypedefTag;
        fullName?: Identifier;
        name?: Identifier;
        typeExpression?: JSDocTypeExpression | JSDocTypeLiteral;
    }

    export interface JSDocCallbackTag extends JSDocTag, NamedDeclaration {
        parent: JSDoc;
        kind: SyntaxKind.JSDocCallbackTag;
        fullName?: Identifier;
        name?: Identifier;
        typeExpression: JSDocSignature;
    }

    export interface JSDocSignature extends JSDocType, Declaration {
        kind: SyntaxKind.JSDocSignature;
        typeParameters?: readonly JSDocTemplateTag[];
        parameters: readonly JSDocParameterTag[];
        type: JSDocReturnTag | undefined;
    }

    export interface JSDocPropertyLikeTag extends JSDocTag, Declaration {
        parent: JSDoc;
        name: EntityName;
        typeExpression?: JSDocTypeExpression;
        /** Whether the property name came before the type -- non-standard for JSDoc, but Typescript-like */
        isNameFirst: boolean;
        isBracketed: boolean;
    }

    export interface JSDocPropertyTag extends JSDocPropertyLikeTag {
        kind: SyntaxKind.JSDocPropertyTag;
    }

    export interface JSDocParameterTag extends JSDocPropertyLikeTag {
        kind: SyntaxKind.JSDocParameterTag;
    }

    export interface JSDocTypeLiteral extends JSDocType {
        kind: SyntaxKind.JSDocTypeLiteral;
        jsDocPropertyTags?: readonly JSDocPropertyLikeTag[];
        /** If true, then this type literal represents an *array* of its type. */
        isArrayType?: boolean;
    }

    // NOTE: Ensure this is up-to-date with src/debug/debug.ts
    export const enum FlowFlags {
        /** 不可及 */
        Unreachable = 1 << 0,  // 无法访问的代码
        /** 开始 */
        Start = 1 << 1,  // 流程图开始
        /** 分支标签 */
        BranchLabel = 1 << 2,  // 非循环交界
        /** 循环标签 */
        LoopLabel = 1 << 3,  // 循环交界
        /** 赋值 */
        Assignment = 1 << 4,  // 赋值
        /** 真条件 */
        TrueCondition = 1 << 5,  // 真条件
        /** 假条件 */
        FalseCondition = 1 << 6,  // 假条件
        /** 假如字句 */
        SwitchClause = 1 << 7,  // 假如字句
        /** 数组突变 */
        ArrayMutation = 1 << 8,  // 潜在阵列突变
        /** 调用 */
        Call = 1 << 9,  // 潜在的断言调用
        /** 引用 */
        Referenced = 1 << 10, // 引用为前身一次
        /**  共享 */
        Shared = 1 << 11, // 多次引用为前身
        /** 预最终 */
        PreFinally = 1 << 12, // 连接预决赛标签和预尝试流的注入边缘
        /** 最后之后 */
        AfterFinally = 1 << 13, // 注入的边缘，将后流与图形的其余部分链接
        /** @internal */
        /** 缓存 */
        Cached = 1 << 14, // 指示此节点至少有一个跨调用缓存条目，即使不是循环参与者
        类型断言_ = 1 << 15,
        /** 标签 */
        Label = BranchLabel | LoopLabel,
        /** 条件 */
        Condition = TrueCondition | FalseCondition,
    }

    export type FlowNode =
        | AfterFinallyFlow
        | PreFinallyFlow
        | FlowStart
        | FlowLabel
        | FlowAssignment
        | FlowCall
        | FlowCondition
        | FlowSwitchClause
        | FlowArrayMutation;

    /* 流程节点基类 */
    export interface FlowNodeBase {
        flags: FlowFlags;
        id?: number;     // Node id used by flow type cache in checker
    }
    /* 流程锁 */
    export interface FlowLock {
        locked?: boolean;
    }
    /* 最后流后 */
    export interface AfterFinallyFlow extends FlowNodeBase, FlowLock {
        antecedent: FlowNode;
    }
    /* 预最后流 */
    export interface PreFinallyFlow extends FlowNodeBase {
        antecedent: FlowNode;
        lock: FlowLock;
    }

    // FlowStart represents the start of a control flow. For a function expression or arrow
    // function, the node property references the function (which in turn has a flowNode
    // property for the containing control flow).
    /* 流开始 */
    export interface FlowStart extends FlowNodeBase {
        node?: FunctionExpression | ArrowFunction | MethodDeclaration;
    }

    // FlowLabel represents a junction with multiple possible preceding control flows.
    /* 流标签 */
    export interface FlowLabel extends FlowNodeBase {
        antecedents: FlowNode[] | undefined;
    }

    // FlowAssignment represents a node that assigns a value to a narrowable reference,
    // i.e. an identifier or a dotted name that starts with an identifier or 'this'.
    /* 流赋值 */
    export interface FlowAssignment extends FlowNodeBase {
        node: Expression | VariableDeclaration;
        antecedent: FlowNode;
    }
    /* 流调用 */
    export interface FlowCall extends FlowNodeBase {
        node: CallExpression;
        antecedent: FlowNode;
    }

    // FlowCondition represents a condition that is known to be true or false at the
    // node's location in the control flow.
    /* 流条件 */
    export interface FlowCondition extends FlowNodeBase {
        node: Expression;
        antecedent: FlowNode;
    }
    /* 流假如字句 */
    export interface FlowSwitchClause extends FlowNodeBase {
        switchStatement: SwitchStatement;
        clauseStart: number;   // Start index of case/default clause range
        clauseEnd: number;     // End index of case/default clause range
        antecedent: FlowNode;
    }

    // FlowArrayMutation represents a node potentially mutates an array, i.e. an
    // operation of the form 'x.push(value)', 'x.unshift(value)' or 'x[n] = value'.
    /* 流数组突变 */
    export interface FlowArrayMutation extends FlowNodeBase {
        node: CallExpression | BinaryExpression;
        antecedent: FlowNode;
    }

    export type FlowType = Type | IncompleteType;

    // Incomplete types occur during control flow analysis of loops. An IncompleteType
    // is distinguished from a regular type by a flags value of zero. Incomplete type
    // objects are internal to the getFlowTypeOfReference function and never escape it.
    export interface IncompleteType {
        flags: TypeFlags;  // No flags set
        type: Type;        // The type marked incomplete
    }

    export interface AmdDependency {
        path: string;
        name?: string;
    }

    /* @internal */
    /**
     * Subset of properties from SourceFile that are used in multiple utility functions
     */
    export interface SourceFileLike {
        readonly text: string;
        lineMap?: readonly number[];
        /* @internal */
        getPositionOfLineAndCharacter?(line: number, character: number, allowEdits?: true): number;
    }


    /* @internal */
    export interface RedirectInfo {
        /** Source file this redirects to. */
        readonly redirectTarget: SourceFile;
        /**
         * Source file for the duplicate package. This will not be used by the Program,
         * but we need to keep this around so we can watch for changes in underlying.
         */
        readonly unredirected: SourceFile;
    }

    // Source files are declarations when they are external modules.
    export interface SourceFile extends Declaration {
        kind: SyntaxKind.SourceFile;
        statements: NodeArray<Statement>;
        endOfFileToken: Token<SyntaxKind.EndOfFileToken>;
        是启动文件?: boolean,
        /* @internal */ 外部方法组?: MethodDeclaration[];
        fileName: string;
        /* @internal */ path: Path;
        text: string;
        /** Resolved path can be different from path property,
         * when file is included through project reference is mapped to its output instead of source
         * in that case resolvedPath = path to output file
         * path = input file's path
         */
        /* @internal */ resolvedPath: Path;
        /** Original file name that can be different from fileName,
         * when file is included through project reference is mapped to its output instead of source
         * in that case originalFileName = name of input file
         * fileName = output file's name
         */
        /* @internal */ originalFileName: string;

        /**
         * If two source files are for the same version of the same package, one will redirect to the other.
         * (See `createRedirectSourceFile` in program.ts.)
         * The redirect will have this set. The redirected-to source file will be in `redirectTargetsMap`.
         */
        /* @internal */ redirectInfo?: RedirectInfo;

        amdDependencies: readonly AmdDependency[];
        moduleName?: string;
        isDeclarationFile: boolean;

        // this map is used by transpiler to supply alternative names for dependencies (i.e. in case of bundling)
        /* @internal */
        renamedDependencies?: ReadonlyMap<string>;

        /* @internal */ identifiers: Map<string>; // Map from a string to an interned string
        /* @internal */ nodeCount: number;
        /* @internal */ identifierCount: number;
        /* @internal */ symbolCount: number;

        // File-level diagnostics reported by the parser (includes diagnostics about /// references
        // as well as code diagnostics).
        /* @internal */ parseDiagnostics: DiagnosticWithLocation[];

        // File-level diagnostics reported by the binder.
        /* @internal */ bindDiagnostics: DiagnosticWithLocation[];
        /* @internal */ bindSuggestionDiagnostics?: DiagnosticWithLocation[];

        // File-level JSDoc diagnostics reported by the JSDoc parser
        /* @internal */ jsDocDiagnostics?: DiagnosticWithLocation[];

        // Stores additional file-level diagnostics reported by the program
        /* @internal */ additionalSyntacticDiagnostics?: readonly DiagnosticWithLocation[];

        // Stores a line map for the file.
        // This field should never be used directly to obtain line map, use getLineMap function instead.
        /* @internal */ lineMap: readonly number[];
        /* @internal */ classifiableNames?: ReadonlyUnderscoreEscapedMap<true>;
        // Stores a mapping 'external module reference text' -> 'resolved file name' | undefined
        // It is used to resolve module names in the checker.
        // Content of this field should never be used directly - use getResolvedModuleFileName/setResolvedModuleFileName functions instead
        /* @internal */ resolvedModules?: Map<解析的模块名称_ | undefined>;
        /* @internal */ imports: readonly StringLiteralLike[];
        /* @internal */ version: string;

        /*@internal*/ exportedModulesFromDeclarationEmit?: ExportedModulesFromDeclarationEmit;
    }

    /*@internal*/
    export type ExportedModulesFromDeclarationEmit = readonly Symbol[];

    export interface Bundle extends Node {
        kind: SyntaxKind.Bundle;
        prepends: readonly (InputFiles | UnparsedSource)[];
        sourceFiles: readonly SourceFile[];
        /* @internal */ hasNoDefaultLib?: boolean;
    }

    export interface InputFiles extends Node {
        kind: SyntaxKind.InputFiles;
        javascriptPath?: string;
        javascriptText: string;
        javascriptMapPath?: string;
        javascriptMapText?: string;
        declarationPath?: string;
        declarationText: string;
        declarationMapPath?: string;
        declarationMapText?: string;
        /*@internal*/ buildInfoPath?: string;
        /*@internal*/ buildInfo?: BuildInfo;
        /*@internal*/ oldFileOfCurrentEmit?: boolean;
    }

    export interface UnparsedSource extends Node {
        kind: SyntaxKind.UnparsedSource;
        fileName: string;
        text: string;
        prologues: readonly UnparsedPrologue[];
        helpers: readonly UnscopedEmitHelper[] | undefined;

        sourceMapPath?: string;
        sourceMapText?: string;
        syntheticReferences?: readonly UnparsedSyntheticReference[];
        texts: readonly UnparsedSourceText[];
        /*@internal*/ oldFileOfCurrentEmit?: boolean;
        /*@internal*/ parsedSourceMap?: RawSourceMap | false | undefined;
        // Adding this to satisfy services, fix later
        /*@internal*/
        getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
    }

    export type UnparsedSourceText = UnparsedPrepend | UnparsedTextLike;
    export type UnparsedNode = UnparsedPrologue | UnparsedSourceText | UnparsedSyntheticReference;

    export interface UnparsedSection extends Node {
        kind: SyntaxKind;
        data?: string;
        parent: UnparsedSource;
    }

    export interface UnparsedPrologue extends UnparsedSection {
        kind: SyntaxKind.UnparsedPrologue;
        data: string;
        parent: UnparsedSource;
    }

    export interface UnparsedPrepend extends UnparsedSection {
        kind: SyntaxKind.UnparsedPrepend;
        data: string;
        parent: UnparsedSource;
        texts: readonly UnparsedTextLike[];
    }

    export interface UnparsedTextLike extends UnparsedSection {
        kind: SyntaxKind.UnparsedText | SyntaxKind.UnparsedInternalText;
        parent: UnparsedSource;
    }

    export interface UnparsedSyntheticReference extends UnparsedSection {
        kind: SyntaxKind.UnparsedSyntheticReference;
        parent: UnparsedSource;
    }

    export interface JsonSourceFile extends SourceFile {
        statements: NodeArray<JsonObjectExpressionStatement>;
    }

    export interface TsConfigSourceFile extends JsonSourceFile {
        extendedSourceFiles?: string[];
    }

    export interface JsonMinusNumericLiteral extends PrefixUnaryExpression {
        kind: SyntaxKind.PrefixUnaryExpression;
        operator: SyntaxKind.MinusToken;
        operand: NumericLiteral;
    }

    export interface JsonObjectExpressionStatement extends ExpressionStatement {
        expression: ObjectLiteralExpression | ArrayLiteralExpression | JsonMinusNumericLiteral | NumericLiteral | StringLiteral | BooleanLiteral | NullLiteral;
    }

    export interface ScriptReferenceHost {
        getCompilerOptions(): CompilerOptions;
        getSourceFile(fileName: string): SourceFile | undefined;
        getSourceFileByPath(path: Path): SourceFile | undefined;
        getCurrentDirectory(): string;
    }

    export interface ParseConfigHost {
        useCaseSensitiveFileNames: boolean;

        readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): readonly string[];

        /**
         * Gets a value indicating whether the specified path exists and is a file.
         * @param path The path to test.
         */
        fileExists(path: string): boolean;

        readFile(path: string): string | undefined;
        trace?(s: string): void;
    }

    /**
     * Branded string for keeping track of when we've turned an ambiguous path
     * specified like "./blah" to an absolute path to an actual
     * tsconfig file, e.g. "/root/blah/tsconfig.json"
     */
    export type ResolvedConfigFileName = string & { _isResolvedConfigFileName: never };

    export type WriteFileCallback = (
        fileName: string,
        data: string,
        writeByteOrderMark: boolean,
        onError?: (message: string) => void,
        sourceFiles?: readonly SourceFile[],
    ) => void;

    export class OperationCanceledException { }

    export interface CancellationToken {
        isCancellationRequested(): boolean;

        /** @throws OperationCanceledException if isCancellationRequested is true */
        throwIfCancellationRequested(): void;
    }

    /*@internal*/
    export enum RefFileKind {
        Import,
    }

    /*@internal*/
    export interface RefFile {
        kind: RefFileKind;
        index: number;
        file: Path;
    }

    // TODO: This should implement TypeCheckerHost but that's an internal type.
    export interface Program extends ScriptReferenceHost {

        /**
         * Get a list of root file names that were passed to a 'createProgram'
         */
        getRootFileNames(): readonly string[];

        /**
         * Get a list of files in the program
         */
        getSourceFiles(): readonly SourceFile[];

        /**
         * Get a list of file names that were passed to 'createProgram' or referenced in a
         * program source file but could not be located.
         */
        /* @internal */
        getMissingFilePaths(): readonly Path[];
        /* @internal */
        getRefFileMap(): MultiMap<RefFile> | undefined;

        /**
         * Emits the JavaScript and declaration files.  If targetSourceFile is not specified, then
         * the JavaScript and declaration files will be produced for all the files in this program.
         * If targetSourceFile is specified, then only the JavaScript and declaration for that
         * specific file will be generated.
         *
         * If writeFile is not specified then the writeFile callback from the compiler host will be
         * used for writing the JavaScript and declaration files.  Otherwise, the writeFile parameter
         * will be invoked when writing the JavaScript and declaration files.
         */
        emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, customTransformers?: CustomTransformers): EmitResult;
        /*@internal*/
        emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, customTransformers?: CustomTransformers, 仅Dts?: boolean, forceDtsEmit?: boolean): EmitResult; // eslint-disable-line @typescript-eslint/unified-signatures

        getOptionsDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[];
        getGlobalDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[];
        getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly DiagnosticWithLocation[];
        /** The first time this is called, it will return global diagnostics (no location). */
        getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[];
        getDeclarationDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly DiagnosticWithLocation[];
        getConfigFileParsingDiagnostics(): readonly Diagnostic[];
        /* @internal */ getSuggestionDiagnostics(sourceFile: SourceFile, cancellationToken?: CancellationToken): readonly DiagnosticWithLocation[];

        /**
         * Gets a type checker that can be used to semantically analyze source files in the program.
         */
        getTypeChecker(): TypeChecker;

        /* @internal */ getCommonSourceDirectory(): string;

        // For testing purposes only.  Should not be used by any other consumers (including the
        // language service).
        /* @internal */ getDiagnosticsProducingTypeChecker(): TypeChecker;
        /* @internal */ dropDiagnosticsProducingTypeChecker(): void;

        /* @internal */ getClassifiableNames(): UnderscoreEscapedMap<true>;

        getNodeCount(): number;
        getIdentifierCount(): number;
        getSymbolCount(): number;
        getTypeCount(): number;
        getRelationCacheSizes(): { assignable: number, identity: number, subtype: number };

        /* @internal */ getFileProcessingDiagnostics(): DiagnosticCollection;
        isSourceFileFromExternalLibrary(file: SourceFile): boolean;
        isSourceFileDefaultLibrary(file: SourceFile): boolean;

        // For testing purposes only.
        /* @internal */ structureIsReused?: StructureIsReused;

        /** Given a source file, get the name of the package it was imported from. */
        /* @internal */ sourceFileToPackageName: Map<string>;
        /** Set of all source files that some other source file redirects to. */
        /* @internal */ redirectTargetsMap: MultiMap<string>;
        /** Is the file emitted file */
        /* @internal */ isEmittedFile(file: string): boolean;

        /* @internal */ getResolvedModuleWithFailedLookupLocationsFromCache(moduleName: string, containingFile: string): ResolvedModuleWithFailedLookupLocations | undefined;

        /*@internal*/ getProgramBuildInfo?(): ProgramBuildInfo | undefined;
        /*@internal*/ emitBuildInfo(writeFile?: WriteFileCallback, cancellationToken?: CancellationToken): EmitResult;
        /*@internal*/ getProbableSymlinks(): ReadonlyMap<string>;
        /* @internal */ 当前源码目录: string;
        /* @internal */ 当前模块目录: string;
        /* @internal */ 全局模块目录: string;
        /* @internal */ 当前项目配置: string;
    }

    /* @internal */
    export type RedirectTargetsMap = ReadonlyMap<readonly string[]>;

    /* @internal */
    export const enum StructureIsReused {
        Not = 0,
        SafeModules = 1 << 0,
        Completely = 1 << 1,
    }

    export type CustomTransformerFactory = (context: TransformationContext) => CustomTransformer;

    export interface CustomTransformer {
        transformSourceFile(node: SourceFile): SourceFile;
        transformBundle(node: Bundle): Bundle;
    }

    export interface CustomTransformers {
        /** Custom transformers to evaluate before built-in .js transformations. */
        before?: (TransformerFactory<SourceFile> | CustomTransformerFactory)[];
        /** Custom transformers to evaluate after built-in .js transformations. */
        after?: (TransformerFactory<SourceFile> | CustomTransformerFactory)[];
        /** Custom transformers to evaluate after built-in .d.ts transformations. */
        afterDeclarations?: (TransformerFactory<Bundle | SourceFile> | CustomTransformerFactory)[];
    }

    /*@internal*/
    export interface EmitTransformers {
        scriptTransformers: readonly TransformerFactory<SourceFile | Bundle>[];
        declarationTransformers: readonly TransformerFactory<SourceFile | Bundle>[];
    }

    export interface SourceMapSpan {
        /** Line number in the .js file. */
        emittedLine: number;
        /** Column number in the .js file. */
        emittedColumn: number;
        /** Line number in the .ts file. */
        sourceLine: number;
        /** Column number in the .ts file. */
        sourceColumn: number;
        /** Optional name (index into names array) associated with this span. */
        nameIndex?: number;
        /** .ts file (index into sources array) associated with this span */
        sourceIndex: number;
    }

    /* @internal */
    export interface SourceMapEmitResult {
        inputSourceFileNames: readonly string[];      // Input source file (which one can use on program to get the file), 1:1 mapping with the sourceMap.sources list
        sourceMap: RawSourceMap;
    }

    /** Return code used by getEmitOutput function to indicate status of the function */
    export enum ExitStatus {
        // Compiler ran successfully.  Either this was a simple do-nothing compilation (for example,
        // when -version or -help was provided, or this was a normal compilation, no diagnostics
        // were produced, and all outputs were generated successfully.
        Success = 0,

        // Diagnostics were produced and because of them no code was generated.
        DiagnosticsPresent_OutputsSkipped = 1,

        // Diagnostics were produced and outputs were generated in spite of them.
        DiagnosticsPresent_OutputsGenerated = 2,

        // When build skipped because passed in project is invalid
        InvalidProject_OutputsSkipped = 3,

        // When build is skipped because project references form cycle
        ProjectReferenceCycle_OutputsSkipped = 4,

        /** @deprecated Use ProjectReferenceCycle_OutputsSkipped instead. */
        ProjectReferenceCycle_OutputsSkupped = 4,
        失败_ = 5,
    }

    export interface EmitResult {
        emitSkipped: boolean;
        /** Contains declaration emit diagnostics */
        diagnostics: readonly Diagnostic[];
        emittedDlangFiles?: string[];
        emittedFiles?: string[]; // Array of files the compiler wrote to disk
        /* @internal */ sourceMaps?: SourceMapEmitResult[];  // Array of sourceMapData if compiler emitted sourcemaps
        /* @internal */ exportedModulesFromDeclarationEmit?: ExportedModulesFromDeclarationEmit;
    }

    /* @internal */
    export interface TypeCheckerHost extends ModuleSpecifierResolutionHost {
        getCompilerOptions(): CompilerOptions;

        getSourceFiles(): readonly SourceFile[];
        getSourceFile(fileName: string): SourceFile | undefined;

        readonly redirectTargetsMap: RedirectTargetsMap;
    }

    export interface TypeChecker {
        getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type;
        getDeclaredTypeOfSymbol(symbol: Symbol): Type;
        getPropertiesOfType(type: Type): Symbol[];
        获取类型的方法组(type: Type): Symbol[];
        getPropertyOfType(type: Type, propertyName: string): Symbol | undefined;
        获取类型方法(type: Type, 方法名称: string): Symbol | undefined;
        是同一程序集的(node: Node, dec: Declaration | undefined): boolean;
        /* @internal */ getTypeOfPropertyOfType(type: Type, propertyName: string): Type | undefined;
        getSignaturesOfType(type: Type, kind: SignatureKind): readonly Signature[];
        getBaseTypes(type: InterfaceType): BaseType[];
        getBaseTypeOfLiteralType(type: Type): Type;
        getWidenedType(type: Type): Type;
        getReturnTypeOfSignature(signature: Signature): Type;
        /**
         * Gets the type of a parameter at a given position in a signature.
         * Returns `any` if the index is not valid.
         */
        /* @internal */ getParameterType(signature: Signature, parameterIndex: number): Type;
        getNullableType(type: Type, flags: TypeFlags): Type;
        getNonNullableType(type: Type): Type;
        /* @internal */ getNonOptionalType(type: Type): Type;
        /* @internal */ isNullableType(type: Type): boolean;
        getTypeArguments(type: TypeReference): readonly Type[];

        // TODO: GH#18217 `xToDeclaration` calls are frequently asserted as defined.
        /** Note that the resulting nodes cannot be checked. */
        typeToTypeNode(type: Type, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): TypeNode | undefined;
        /* @internal */ typeToTypeNode(type: Type, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, tracker?: SymbolTracker): TypeNode | undefined; // eslint-disable-line @typescript-eslint/unified-signatures
        /** Note that the resulting nodes cannot be checked. */
        signatureToSignatureDeclaration(signature: Signature, kind: SyntaxKind, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): SignatureDeclaration & { typeArguments?: NodeArray<TypeNode> } | undefined;
        /* @internal */ signatureToSignatureDeclaration(signature: Signature, kind: SyntaxKind, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, tracker?: SymbolTracker): SignatureDeclaration & { typeArguments?: NodeArray<TypeNode> } | undefined; // eslint-disable-line @typescript-eslint/unified-signatures
        /** Note that the resulting nodes cannot be checked. */
        symbolToEntityName(symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): EntityName | undefined;
        /** Note that the resulting nodes cannot be checked. */
        symbolToExpression(symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): Expression | undefined;
        /** Note that the resulting nodes cannot be checked. */
        symbolToTypeParameterDeclarations(symbol: Symbol, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): NodeArray<TypeParameterDeclaration> | undefined;
        /** Note that the resulting nodes cannot be checked. */
        symbolToParameterDeclaration(symbol: Symbol, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): ParameterDeclaration | undefined;
        /** Note that the resulting nodes cannot be checked. */
        typeParameterToDeclaration(parameter: TypeParameter, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): TypeParameterDeclaration | undefined;

        getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[];
        getSymbolAtLocation(node: Node): Symbol | undefined;
        getSymbolsOfParameterPropertyDeclaration(parameter: ParameterDeclaration, parameterName: string): Symbol[];
        /**
         * The function returns the value (local variable) symbol of an identifier in the short-hand property assignment.
         * This is necessary as an identifier in short-hand property assignment can contains two meaning: property name and property value.
         */
        getShorthandAssignmentValueSymbol(location: Node): Symbol | undefined;
        /**
         * If a symbol is a local symbol with an associated exported symbol, returns the exported symbol.
         * Otherwise returns its input.
         * For example, at `export type T = number;`:
         *     - `getSymbolAtLocation` at the location `T` will return the exported symbol for `T`.
         *     - But the result of `getSymbolsInScope` will contain the *local* symbol for `T`, not the exported symbol.
         *     - Calling `getExportSymbolOfSymbol` on that local symbol will return the exported symbol.
         */
        getExportSymbolOfSymbol(symbol: Symbol): Symbol;
        getTypeAtLocation(node: Node): Type;
        getTypeFromTypeNode(node: TypeNode): Type;

        signatureToString(signature: Signature, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string;
        typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string;
        symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): string;
        typePredicateToString(predicate: TypePredicate, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string;
        /* @internal */ writeSignature(signature: Signature, enclosingDeclaration?: Node, flags?: TypeFormatFlags, writer?: EmitTextWriter): string;
        /* @internal */ writeType(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags, writer?: EmitTextWriter): string;
        /* @internal */ writeSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags, writer?: EmitTextWriter): string;
        /* @internal */ writeTypePredicate(predicate: TypePredicate, enclosingDeclaration?: Node, flags?: TypeFormatFlags, writer?: EmitTextWriter): string;

        getFullyQualifiedName(symbol: Symbol): string;
        getAugmentedPropertiesOfType(type: Type): Symbol[];
        获取类型的增强方法(type: Type): Symbol[];
        获取声明类型的原型类型(type: Type): Type;
        getRootSymbols(symbol: Symbol): readonly Symbol[];
        getContextualType(node: Expression): Type | undefined;
        /* @internal */ getContextualType(node: Expression, contextFlags?: ContextFlags): Type | undefined; // eslint-disable-line @typescript-eslint/unified-signatures
        /* @internal */ getContextualTypeForObjectLiteralElement(element: ObjectLiteralElementLike): Type | undefined;
        /* @internal */ getContextualTypeForArgumentAtIndex(call: CallLikeExpression, argIndex: number): Type | undefined;
        /* @internal */ isContextSensitive(node: Expression | MethodDeclaration | ObjectLiteralElementLike): boolean;

        /**
         * returns unknownSignature in the case of an error.
         * returns undefined if the node is not valid.
         * @param argumentCount Apparent number of arguments, passed in case of a possibly incomplete call. This should come from an ArgumentListInfo. See `signatureHelp.ts`.
         */
        getResolvedSignature(node: CallLikeExpression | NewExpression, candidatesOutArray?: Signature[], argumentCount?: number): Signature | undefined;
        /* @internal */ getResolvedSignatureForSignatureHelp(node: CallLikeExpression, candidatesOutArray?: Signature[], argumentCount?: number): Signature | undefined;
        /* @internal */ getExpandedParameters(sig: Signature): readonly Symbol[];
        /* @internal */ hasEffectiveRestParameter(sig: Signature): boolean;
        getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature | undefined;
        isImplementationOfOverload(node: SignatureDeclaration): boolean | undefined;
        isUnknownSymbol(symbol: Symbol): boolean;
        /* @internal */ getMergedSymbol(symbol: Symbol): Symbol;

        getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): string | number | undefined;
        isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean;
        /** Exclude accesses to private properties or methods with a `this` parameter that `type` doesn't satisfy. */
        /* @internal */ isValidPropertyAccessForCompletions(node: PropertyAccessExpression | QualifiedName, type: Type, property: Symbol): boolean;
        /** Follow all aliases to get the original symbol. */
        getAliasedSymbol(symbol: Symbol): Symbol;
        /** Follow a *single* alias to get the immediately aliased symbol. */
        /* @internal */ getImmediateAliasedSymbol(symbol: Symbol): Symbol | undefined;
        getExportsOfModule(moduleSymbol: Symbol): Symbol[];
        isOptionalParameter(node: ParameterDeclaration): boolean;

        tryGetMemberInModuleExports(memberName: string, moduleSymbol: Symbol): Symbol | undefined;
        getApparentType(type: Type): Type;
        /* @internal */ getSuggestionForNonexistentProperty(name: Identifier | string, containingType: Type): string | undefined;
        /* @internal */ getSuggestionForNonexistentSymbol(location: Node, name: string, meaning: SymbolFlags): string | undefined;
        /* @internal */ getSuggestionForNonexistentExport(node: Identifier, target: Symbol): string | undefined;
        getBaseConstraintOfType(type: Type): Type | undefined;
        getDefaultFromTypeParameter(type: Type): Type | undefined;

        /* @internal */ getAnyType(): Type;
        /* @internal */ getStringType(): Type;
        /* @internal */ getNumberType(): Type;
        /* @internal */ getBooleanType(): Type;
        /* @internal */ getFalseType(fresh?: boolean): Type;
        /* @internal */ getTrueType(fresh?: boolean): Type;
        /* @internal */ getVoidType(): Type;
        /* @internal */ getNullType(): Type;
        /* @internal */ getNeverType(): Type;
        /* @internal */ getUnionType(types: Type[], subtypeReduction?: UnionReduction): Type;
        /* @internal */ createArrayType(elementType: Type, 长度?: number | TypeParameter): Type;
        /* @internal */ getElementTypeOfArrayType(arrayType: Type): Type | undefined;

        /* @internal */ isTypeAssignableTo(source: Type, target: Type): boolean;
        /* @internal */ 创建指针类型(type: Type): Type;
        /* @internal */ createAnonymousType(symbol: Symbol, members: SymbolTable, 方法表: SymbolTable, callSignatures: Signature[], constructSignatures:  Signature[]): Type;
        /* @internal */ createSignature(
            declaration: SignatureDeclaration,
            typeParameters: TypeParameter[] | undefined,
            thisParameter: Symbol | undefined,
            parameters: Symbol[],
            resolvedReturnType: Type,
            minArgumentCount: number,
            flags: SignatureFlags
        ): Signature;
        /* @internal */ createSymbol(flags: SymbolFlags, name: string): TransientSymbol;
        /* @internal */ isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node | undefined, meaning: SymbolFlags, shouldComputeAliasToMarkVisible: boolean): SymbolAccessibilityResult;


        /* @internal */ getSymbolWalker(accept?: (symbol: Symbol) => boolean): SymbolWalker;

        // Should not be called directly.  Should only be accessed through the Program instance.
        /* @internal */ getDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[];
        /* @internal */ getGlobalDiagnostics(): Diagnostic[];
        /* @internal */ getEmitResolver(sourceFile?: SourceFile, cancellationToken?: CancellationToken): EmitResolver;

        /* @internal */ getNodeCount(): number;
        /* @internal */ getIdentifierCount(): number;
        /* @internal */ getSymbolCount(): number;
        /* @internal */ getTypeCount(): number;
        /* @internal */ getRelationCacheSizes(): { assignable: number, identity: number, subtype: number };

        /* @internal */ isArrayType(type: Type): boolean;
        /* @internal */ isArrayLikeType(type: Type): boolean;
        /* @internal */ getObjectFlags(type: Type): ObjectFlags;

        /**
         * True if `contextualType` should not be considered for completions because
         * e.g. it specifies `kind: "a"` and obj has `kind: "b"`.
         */
        /* @internal */ isTypeInvalidDueToUnionDiscriminant(contextualType: Type, obj: ObjectLiteralExpression): boolean;

        /**
         * For a union, will include a property if it's defined in *any* of the member types.
         * So for `{ a } | { b }`, this will include both `a` and `b`.
         * Does not include properties of primitive types.
         */
        /* @internal */ getAllPossiblePropertiesOfTypes(type: readonly Type[]): Symbol[];
        /* @internal */ resolveName(name: Identifier, location: Node, meaning: SymbolFlags, excludeGlobals: boolean): Symbol | undefined;

        /**
         * Note that this will return undefined in the following case:
         *     // a.ts
         *     export namespace N { export class C { } }
         *     // b.ts
         *     <<enclosingDeclaration>>
         * Where `C` is the symbol we're looking for.
         * This should be called in a loop climbing parents of the symbol, so we'll get `N`.
         */
        /* @internal */ getAccessibleSymbolChain(symbol: Symbol, enclosingDeclaration: Node | undefined, meaning: SymbolFlags, useOnlyExternalAliasing: boolean): Symbol[] | undefined;
        /* @internal */ resolveExternalModuleSymbol(symbol: Symbol): Symbol;
        /** @param node A location where we might consider accessing `this`. Not necessarily a ThisExpression. */
        /* @internal */ tryGetThisTypeAt(node: Node): Type | undefined;
        /* @internal */ getTypeArgumentConstraint(node: TypeNode): Type | undefined;

        /**
         * Does *not* get *all* suggestion diagnostics, just the ones that were convenient to report in the checker.
         * Others are added in computeSuggestionDiagnostics.
         */
        /* @internal */ getSuggestionDiagnostics(file: SourceFile, cancellationToken?: CancellationToken): readonly DiagnosticWithLocation[];

        /**
         * Depending on the operation performed, it may be appropriate to throw away the checker
         * if the cancellation token is triggered. Typically, if it is used for error checking
         * and the operation is cancelled, then it should be discarded, otherwise it is safe to keep.
         */
        runWithCancellationToken<T>(token: CancellationToken, cb: (checker: TypeChecker) => T): T;
        /* @internal */ getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol: Symbol): readonly TypeParameter[] | undefined;
    }

    /* @internal */
    export const enum UnionReduction {
        None = 0,
        Literal,
        Subtype
    }

    /* @internal */
    export const enum ContextFlags {
        None = 0,
        Signature = 1 << 0, // Obtaining contextual signature
        NoConstraints = 1 << 1, // Don't obtain type variable constraints
        Completion = 1 << 2, // Obtaining constraint type for completion
    }

    // NOTE: If modifying this enum, must modify `TypeFormatFlags` too!
    export const enum NodeBuilderFlags {
        None = 0,
        // Options
        NoTruncation = 1 << 0,   // Don't truncate result
        WriteArrayAsGenericType = 1 << 1,   // Write Array<T> instead T[]
        GenerateNamesForShadowedTypeParams = 1 << 2,   // When a type parameter T is shadowing another T, generate a name for it so it can still be referenced
        UseStructuralFallback = 1 << 3,   // When an alias cannot be named by its symbol, rather than report an error, fallback to a structural printout if possible
        ForbidIndexedAccessSymbolReferences = 1 << 4,   // Forbid references like `I["a"]["b"]` - print `typeof I.a<x>.b<y>` instead
        WriteTypeArgumentsOfSignature = 1 << 5,   // Write the type arguments instead of type parameters of the signature
        UseFullyQualifiedType = 1 << 6,   // Write out the fully qualified type name (eg. Module.Type, instead of Type)
        UseOnlyExternalAliasing = 1 << 7,   // Only use external aliases for a symbol
        SuppressAnyReturnType = 1 << 8,   // If the return type is any-like, don't offer a return type.
        WriteTypeParametersInQualifiedName = 1 << 9,
        MultilineObjectLiterals = 1 << 10,  // Always write object literals across multiple lines
        WriteClassExpressionAsTypeLiteral = 1 << 11,  // Write class {} as { new(): {} } - used for mixin declaration emit
        UseTypeOfFunction = 1 << 12,  // Build using typeof instead of function type literal
        OmitParameterModifiers = 1 << 13,  // Omit modifiers on parameters
        UseAliasDefinedOutsideCurrentScope = 1 << 14,  // Allow non-visible aliases

        // Error handling
        AllowThisInObjectLiteral = 1 << 15,
        AllowQualifedNameInPlaceOfIdentifier = 1 << 16,
        AllowAnonymousIdentifier = 1 << 17,
        AllowEmptyUnionOrIntersection = 1 << 18,
        
        AllowUniqueESSymbolType = 1 << 19,
        AllowEmptyIndexInfoType = 1 << 20,

        // Errors (cont.)
        AllowNodeModulesRelativePaths = 1 << 21,
        /* @internal */ DoNotIncludeSymbolChain = 1 << 22,    // Skip looking up and printing an accessible symbol chain

        IgnoreErrors = AllowThisInObjectLiteral | AllowQualifedNameInPlaceOfIdentifier | AllowAnonymousIdentifier | AllowEmptyUnionOrIntersection | AllowEmptyIndexInfoType | AllowNodeModulesRelativePaths,

        // State
        InObjectTypeLiteral = 1 << 13,
        InTypeAlias = 1 << 24,    // Writing type in type alias declaration
        InInitialEntityName = 1 << 25,    // Set when writing the LHS of an entity name or entity name expression
        字面量外观_ = 1 << 26,
        D_lang = 1 << 29,
    }

    // Ensure the shared flags between this and `NodeBuilderFlags` stay in alignment
    export const enum TypeFormatFlags {
        None = 0,
        NoTruncation = 1 << 0,  // Don't truncate typeToString result
        WriteArrayAsGenericType = 1 << 1,  // Write Array<T> instead T[]
        // hole because there's a hole in node builder flags
        UseStructuralFallback = 1 << 3,   // When an alias cannot be named by its symbol, rather than report an error, fallback to a structural printout if possible
        // hole because there's a hole in node builder flags
        WriteTypeArgumentsOfSignature = 1 << 5,  // Write the type arguments instead of type parameters of the signature
        UseFullyQualifiedType = 1 << 6,  // Write out the fully qualified type name (eg. Module.Type, instead of Type)
        // hole because `UseOnlyExternalAliasing` is here in node builder flags, but functions which take old flags use `SymbolFormatFlags` instead
        SuppressAnyReturnType = 1 << 8,  // If the return type is any-like, don't offer a return type.
        // hole because `WriteTypeParametersInQualifiedName` is here in node builder flags, but functions which take old flags use `SymbolFormatFlags` for this instead
        MultilineObjectLiterals = 1 << 10, // Always print object literals across multiple lines (only used to map into node builder flags)
        WriteClassExpressionAsTypeLiteral = 1 << 11, // Write a type literal instead of (Anonymous class)
        UseTypeOfFunction = 1 << 12, // Write typeof instead of function type literal
        OmitParameterModifiers = 1 << 13, // Omit modifiers on parameters

        UseAliasDefinedOutsideCurrentScope = 1 << 14, // For a `type T = ... ` defined in a different file, write `T` instead of its value, even though `T` can't be accessed in the current scope.

        // Error Handling
        AllowUniqueESSymbolType = 1 << 20, // This is bit 20 to align with the same bit in `NodeBuilderFlags`

        // TypeFormatFlags exclusive
        AddUndefined = 1 << 17, // Add undefined to types of initialized, non-optional parameters
        WriteArrowStyleSignature = 1 << 18, // Write arrow style signature

        // State
        InArrayType = 1 << 19, // Writing an array element type
        InElementType = 1 << 21, // Writing an array or union element type
        InFirstTypeArgument = 1 << 22, // Writing first type argument of the instantiated type
        InTypeAlias = 1 << 23, // Writing type in type alias declaration
        字面量外观_ = 1 << 26,
        D_lang = 1 << 29,

        /** @deprecated */ WriteOwnNameForAnyLike = 0,  // Does nothing

        NodeBuilderFlagsMask = D_lang | NoTruncation | WriteArrayAsGenericType | UseStructuralFallback | WriteTypeArgumentsOfSignature |
        UseFullyQualifiedType | SuppressAnyReturnType | MultilineObjectLiterals | WriteClassExpressionAsTypeLiteral |
        UseTypeOfFunction | OmitParameterModifiers | UseAliasDefinedOutsideCurrentScope | AllowUniqueESSymbolType | InTypeAlias,
    }

    export const enum SymbolFormatFlags {
        None = 0x00000000,

        // Write symbols's type argument if it is instantiated symbol
        // eg. class C<T> { p: T }   <-- Show p as C<T>.p here
        //     var a: C<number>;
        //     var p = a.p; <--- Here p is property of C<number> so show it as C<number>.p instead of just C.p
        WriteTypeParametersOrArguments = 0x00000001,

        // Use only external alias information to get the symbol name in the given context
        // eg.  module m { export class c { } } import x = m.c;
        // When this flag is specified m.c will be used to refer to the class instead of alias symbol x
        UseOnlyExternalAliasing = 0x00000002,

        // Build symbol name using any nodes needed, instead of just components of an entity name
        AllowAnyNodeKind = 0x00000004,

        // Prefer aliases which are not directly visible
        UseAliasDefinedOutsideCurrentScope = 0x00000008,

        // Skip building an accessible symbol chain
        /* @internal */ DoNotIncludeSymbolChain = 0x00000010,
    }

    /* @internal */
    export interface SymbolWalker {
        /** Note: Return values are not ordered. */
        walkType(root: Type): { visitedTypes: readonly Type[], visitedSymbols: readonly Symbol[] };
        /** Note: Return values are not ordered. */
        walkSymbol(root: Symbol): { visitedTypes: readonly Type[], visitedSymbols: readonly Symbol[] };
    }

    // This was previously deprecated in our public API, but is still used internally
    /* @internal */
    interface SymbolWriter extends SymbolTracker {
        writeKeyword(text: string): void;
        writeOperator(text: string): void;
        writePunctuation(text: string): void;
        writeSpace(text: string): void;
        writeStringLiteral(text: string): void;
        writeParameter(text: string): void;
        writeProperty(text: string): void;
        writeSymbol(text: string, symbol: Symbol): void;
        writeLine(): void;
        increaseIndent(): void;
        decreaseIndent(): void;
        clear(): void;
    }

    /* @internal */
    export const enum SymbolAccessibility {
        Accessible,
        NotAccessible,
        CannotBeNamed
    }

    /* @internal */
    export const enum SyntheticSymbolKind {
        UnionOrIntersection,
        Spread
    }

    export const enum TypePredicateKind {
        This,
        Identifier,
    }

    export interface TypePredicateBase {
        kind: TypePredicateKind;
        type: Type | undefined;
    }

    export interface IdentifierTypePredicate extends TypePredicateBase {
        kind: TypePredicateKind.Identifier;
        parameterName: string;
        type: Type;
    }

    export type TypePredicate = IdentifierTypePredicate

    /* @internal */
    export type AnyImportSyntax = 导入声明_ | 导入从声明_;

    /* @internal */
    export type RequireOrImportCall = CallExpression & { arguments: [StringLiteralLike] };

    /* @internal */
    export type LateVisibilityPaintedStatement =
        | AnyImportSyntax
        | InterfaceDeclaration
        | EnumDeclaration
        | 程序声明_
        | 对象声明_
        | 类型声明节点_
        | 别名声明节点_;


    /* @internal */
    export interface SymbolVisibilityResult {
        accessibility: SymbolAccessibility;
        aliasesToMakeVisible?: LateVisibilityPaintedStatement[]; // aliases that need to have this symbol visible
        errorSymbolName?: string; // Optional symbol name that results in error
        errorNode?: Node; // optional node that results in error
    }

    /* @internal */
    export interface SymbolAccessibilityResult extends SymbolVisibilityResult {
        errorModuleName?: string; // If the symbol is not visible from module, module's name
    }

    /** Indicates how to serialize the name for a TypeReferenceNode when emitting decorator metadata */
    /* @internal */
    export enum TypeReferenceSerializationKind {
        // The TypeReferenceNode could not be resolved.
        // The type name should be emitted using a safe fallback.
        Unknown,

        // The TypeReferenceNode resolves to a type with a constructor
        // function that can be reached at runtime (e.g. a `class`
        // declaration or a `var` declaration for the static side
        // of a type, such as the global `Promise` type in lib.d.ts).
        TypeWithConstructSignatureAndValue,

        // The TypeReferenceNode resolves to a Void-like, Nullable, or Never type.
        VoidNullableOrNeverType,

        // The TypeReferenceNode resolves to a Number-like type.
        NumberLikeType,

        // The TypeReferenceNode resolves to a BigInt-like type.
        BigIntLikeType,

        // The TypeReferenceNode resolves to a String-like type.
        StringLikeType,

        // The TypeReferenceNode resolves to a Boolean-like type.
        BooleanType,

        // The TypeReferenceNode resolves to an Array-like type.
        ArrayLikeType,

        // The TypeReferenceNode resolves to the ESSymbol type.
        ESSymbolType,

        // The TypeReferenceNode resolved to the global Promise constructor symbol.
        Promise,

        // The TypeReferenceNode resolves to a Function type or a type with call signatures.
        TypeWithCallSignature,

        // The TypeReferenceNode resolves to any other type.
        ObjectType,
    }

    /* @internal */
    export interface EmitResolver {
        hasGlobalName(name: string): boolean;
        getReferencedExportContainer(node: Identifier, prefixLocals?: boolean): SourceFile | EnumDeclaration | undefined;
        getReferencedImportDeclaration(node: Identifier): Declaration | undefined;
        getReferencedDeclarationWithCollidingName(node: Identifier): Declaration | undefined;
        isDeclarationWithCollidingName(node: Declaration): boolean;
        isReferencedAliasDeclaration(node: Node, checkChildren?: boolean): boolean;
        getNodeCheckFlags(node: Node): NodeCheckFlags;
        isDeclarationVisible(node: Declaration | AnyImportSyntax): boolean;
        collectLinkedAliases(setVisibility?: boolean): Node[] | undefined;
        isImplementationOfOverload(node: FunctionLike): boolean | undefined;
        isRequiredInitializedParameter(node: ParameterDeclaration): boolean;
        isOptionalUninitializedParameterProperty(node: ParameterDeclaration): boolean;
        isExpandoFunctionDeclaration(node: FunctionDeclaration): boolean;
        getPropertiesOfContainerFunction(node: Declaration): Symbol[];
        createTypeOfDeclaration(declaration: VariableLikeDeclaration | PropertyAccessExpression, enclosingDeclaration: Node, flags: NodeBuilderFlags, tracker: SymbolTracker, addUndefined?: boolean): TypeNode | undefined;
        createReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: NodeBuilderFlags, tracker: SymbolTracker): TypeNode | undefined;
        createTypeOfExpression(expr: Expression, enclosingDeclaration: Node, flags: NodeBuilderFlags, tracker: SymbolTracker): TypeNode | undefined;
        createLiteralConstValue(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration, tracker: SymbolTracker): Expression;
        isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node | undefined, meaning: SymbolFlags | undefined, shouldComputeAliasToMarkVisible: boolean): SymbolAccessibilityResult;
        isEntityNameVisible(entityName: EntityNameOrEntityNameExpression, enclosingDeclaration: Node): SymbolVisibilityResult;
        // Returns the constant value this property access resolves to, or 'undefined' for a non-constant
        getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): string | number | undefined;
        getReferencedValueDeclaration(reference: Identifier): Declaration | undefined;
        getTypeReferenceSerializationKind(typeName: EntityName, location?: Node): TypeReferenceSerializationKind;
        isOptionalParameter(node: ParameterDeclaration): boolean;
        getTypeReferenceDirectivesForEntityName(name: EntityNameOrEntityNameExpression): string[] | undefined;
        getTypeReferenceDirectivesForSymbol(symbol: Symbol, meaning?: SymbolFlags): string[] | undefined;
        isLiteralConstDeclaration(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration): boolean;
        getSymbolOfExternalModuleSpecifier(node: 导入成员_ | 导入从声明_): Symbol | undefined;
        getDeclarationStatementsForSourceFile(node: SourceFile, flags: NodeBuilderFlags, tracker: SymbolTracker, bundled?: boolean): Statement[] | undefined;
        转换项目文件(node: Bundle, context: TransformationContext): Bundle
    }

    export const enum SymbolFlags {
        None = 0,
        FunctionScopedVariable = 1 << 0,   // var  全局变量
        BlockScopedVariable = 1 << 1,   // 变量 和简洁变量
        Property = 1 << 2,   // Property or enum member
        EnumMember = 1 << 3,   // Enum member
        Function = 1 << 4,   // Function
        Interface = 1 << 5,   // Interface
        ConstEnum = 1 << 6,   // Const enum
        TypeLiteral = 1 << 7,  // Type Literal or mapped type
        ObjectLiteral = 1 << 8,  // Object Literal
        Method = 1 << 9,  // Method
        方法声明_ = 1 << 10,
        Signature = 1 << 11,  // Call, construct, or index signature
        TypeParameter = 1 << 12,  // Type parameter
        类型别名_ = 1 << 13,  // Type alias
        Alias = 1 << 14,  // An alias for another symbol (see comment in isAliasSymbolDeclaration in checker)
        Optional = 1 << 15,  // Optional property
        Transient = 1 << 17,  // Transient symbol (created during type check)
        对象_ = 1 << 18,
        函数签名_ = 1 << 19,   // 函数_
        类型声明_ = 1 << 20,  // Type alias
        程序_ = 1 << 21,
        版本声明_ = 1 << 22,
        原型_ = 1 << 23,
        是私有_ = 1 << 24,
        是联合类型属性临时符号_ = 1 << 25,
        方法签名_  = 1 << 26,
        参数_ = 1 << 27,
        转换词典值_ = 1 << 28,
        结构_ = 1 << 29,

        /* @internal */
        All = 转换词典值_ | FunctionScopedVariable | BlockScopedVariable | Property | EnumMember | Function | Interface | ConstEnum | TypeLiteral | 原型_
        | ObjectLiteral | Method | 方法声明_ | Signature | TypeParameter | 类型别名_ | 是私有_ | 是联合类型属性临时符号_ | Alias | Optional | Transient | 对象_ | 结构_ | 类型声明_ | 程序_ | 函数签名_ | 版本声明_,

        Variable = FunctionScopedVariable | BlockScopedVariable | 转换词典值_,

        Value = Variable | Property | EnumMember | ObjectLiteral | Function | ConstEnum | Method | 方法声明_ | 程序_ | 函数签名_ | 原型_,
        Type = 对象_ | 结构_ | Interface | ConstEnum | EnumMember | TypeLiteral | TypeParameter | 类型别名_ | 类型声明_ | 转换词典值_,
        
        Namespace = 程序_ | ConstEnum | 转换词典值_,
        Enum = ConstEnum,

        排除版本_ = All & ~版本声明_,
        // Variables can be redeclared, but can not redeclare a block-scoped declaration with the
        // same name, or any other value that is not a variable, e.g. ValueModule or Class
        FunctionScopedVariableExcludes = 排除版本_,

        // Block-scoped declarations are not allowed to be re-declared
        // they can not merge with anything in the value space
        BlockScopedVariableExcludes = 排除版本_,
        转换词典排除_ = 排除版本_,
        程序排除_ = 排除版本_ & ~程序_,
        签名排除_ = 排除版本_ & ~Signature,
        对象排除_ = 排除版本_,
        结构排除_ = 排除版本_,
        类型声明排除_ = 排除版本_,
        ParameterExcludes = 排除版本_,
        PropertyExcludes = 排除版本_,
        EnumMemberExcludes = 排除版本_,
        FunctionExcludes = 排除版本_,
        InterfaceExcludes = 排除版本_,
        RegularEnumExcludes = 排除版本_, // regular enums merge only with regular enums and modules
        ConstEnumExcludes = 排除版本_, // const enums merge only with const enums
        MethodExcludes = 排除版本_ & ~Method,
        TypeParameterExcludes = 排除版本_ & ~TypeParameter,
        TypeAliasExcludes = 排除版本_,
        类型声明排除 = 排除版本_,
        AliasExcludes = 排除版本_,
        对象成员_ = Variable | Function | Interface | ConstEnum | 对象_ | 结构_ | 类型别名_ | 类型声明_,
        ExportHasLocal = Function | ConstEnum,
        BlockScoped = BlockScopedVariable | ConstEnum,
        /* @internal */
        // The set of things we consider semantically classifiable.  Used to speed up the LS during
        // classification.
        Classifiable = 对象_ | 结构_ | ConstEnum | 类型别名_ | 类型声明_ | Interface | TypeParameter | 程序_ | Alias,

        /* @internal */
        LateBindingContainer = 对象_ | 结构_ | Interface | TypeLiteral | ObjectLiteral | Function,
    }

    export const enum 逃逸计算标志_ {
        无_ = 0,
        // 参数或变量
        赋值给结构或对象_ = 1 << 1,
        赋值给全局变量_ = 1 << 2,
        赋值给返回语句_  = 1 << 3,
        赋值给参数_ = 1 << 4,
        类型参数指针类型_ = 1 << 5,
        是类型参数_ = 1 << 6,
        是全局变量_ = 1 << 7,
        变量接收过取址赋值_ = 1 << 8,
        参数接受取址相关变量需要逃逸_ = 1 << 9,
        接受了包含泛型类型的参数赋值_ = 1 << 10,
        接受局部指针类型立即逃逸_ = 1 << 11,
        // 函数或方法
    }

    export interface Symbol {
        flags: SymbolFlags;                     // Symbol flags
        escapedName: string;                  // Name of symbol
        别名?: string;
        declarations: Declaration[];            // Declarations associated with this symbol
        valueDeclaration: Declaration;          // First value declaration of the symbol
        members?: SymbolTable;                  // Class, interface or object literal instance members
        /* @internal */ id?: number;            // Unique id (used to look up SymbolLinks)
        /* @internal */ mergeId?: number;       // Merge id (used to look up merged symbol)
        /* @internal */ parent?: Symbol;        // Parent symbol
        /* @internal */ isReferenced?: SymbolFlags; // True if the symbol is referenced elsewhere. Keeps track of the meaning of a reference in case a symbol is both a type parameter and parameter.
        /* @internal */ isAssigned?: boolean;   // True if the symbol is a parameter with assignments
        /* @internal */ assignmentDeclarationMembers?: Map<Declaration>; // detected late-bound assignment declarations associated with the symbol
        /* @internal */ 禁止声明方法?: boolean;
        /* @internal */ 有方法?: boolean;
        /* @internal */ 是外部的符号?: boolean;
    }

    /* @internal */
    export interface SymbolLinks {
        immediateTarget?: Symbol;                   // Immediate target of an alias. May be another alias. Do not access directly, use `checker.getImmediateAliasedSymbol` instead.
        target?: Symbol;                            // Resolved (non-alias) target of an alias
        type?: Type;                                // Type of value symbol
        uniqueESSymbolType?: Type;                  // UniqueESSymbol type for a symbol
        declaredType?: Type;                        // Type of class, interface, enum, type alias, or type parameter
        resolvedJSDocType?: Type;                   // Resolved type of a JSDoc type reference
        typeParameters?: TypeParameter[];           // Type parameters of type alias (undefined if non-generic)
        outerTypeParameters?: TypeParameter[];      // Outer type parameters of anonymous object type
        instantiations?: Map<Type>;                 // Instantiations of generic type alias (undefined if non-generic)
        inferredClassSymbol?: Map<TransientSymbol>; // Symbol of an inferred ES5 constructor function
        referenced?: boolean;                       // True if alias symbol has been referenced as a value        
        mapper?: TypeMapper;                        // Type mapper for instantiation alias
        containingType?: UnionOrIntersectionType;   // Containing union or intersection type for synthetic property
        leftSpread?: Symbol;                        // Left source for synthetic spread property
        rightSpread?: Symbol;                       // Right source for synthetic spread property
        syntheticOrigin?: Symbol;                   // For a property on a mapped or spread type, points back to the original property
        isDiscriminantProperty?: boolean;           // True if discriminant synthetic property
        resolvedExports?: SymbolTable;              // Resolved exports of module or combined early- and late-bound static members of a class.
        resolvedMembers?: SymbolTable;              // Combined early- and late-bound members of a symbol
        exportsChecked?: boolean;                   // True if exports of external module have been checked
        typeParametersChecked?: boolean;            // True if type parameters of merged class and interface declarations have been checked.
        isDeclarationWithCollidingName?: boolean;   // True if symbol is block scoped redeclaration
        exportsSomeValue?: boolean;                 // True if module exports some value (not just types)
        enumKind?: EnumKind;                        // Enum declaration classification
        originatingImport?: 导入声明_;             // Import declaration which produced the symbol, present if the symbol is marked as uncallable but had call signatures in `resolveESModuleSymbol`
        lateSymbol?: Symbol;                // Late-bound symbol for a computed property
        specifierCache?: Map<string>;     // For symbols corresponding to external modules, a cache of incoming path -> module specifier name mappings
        extendedContainers?: Symbol[];      // Containers (other than the parent) which this symbol is aliased in
        extendedContainersByFile?: Map<Symbol[]>;      // Containers (other than the parent) which this symbol is aliased in
        variances?: VarianceFlags[];             // Alias symbol type argument variance cache
        deferralConstituents?: Type[];      // Calculated list of constituents for a deferred type
        deferralParent?: Type;              // Source union/intersection of a deferred type
        cjsExportMerged?: Symbol;           // Version of the symbol with all non export= exports merged with the export= target
        解析的默认全参数构造签名?: Signature[];
        构造顺序?: string[];
        构造顺序符号?: Symbol[];
        携带的联合约束类型?: Type;
        d_包含隐式联合类型?: boolean;
        类型参数有效范围?: 类型参数有效范围_[];
        d_逃逸标志?: 逃逸计算标志_;
        d_逃逸表达式组?: ExprTypeCache[];
        d_逃逸符号组?: Symbol[];
        d_延迟实例化?: 延迟实例化数据_
        d_接口约束类型缓存?: Type
    }

    export interface 延迟实例化数据_ {
        调用名称: Identifier | PropertyAccessExpression | QualifiedName,
        还原映射?: TypeMapper,
        引用声明的约束类型?: Type,
        引用的函数节点类型?: Type
    }

    export interface 类型参数有效范围_{
        范围: Node,
        类型: Type
    }
    
    export interface SymbolTypeCache{
        syms: Symbol[], 
        type: Type
    }

    export interface ExprTypeCache{
        expr: Expression, 
        type: Type
    }

    /* @internal */
    export const enum EnumKind {
        Numeric,                            // Numeric enum (each member has a TypeFlags.Enum type)
        Literal                             // Literal enum (each member has a TypeFlags.EnumLiteral type)
    }

    /* @internal */
    export const enum CheckFlags {
        Instantiated = 1 << 0,         // Instantiated symbol
        SyntheticProperty = 1 << 1,         // Property in union or intersection type
        SyntheticMethod = 1 << 2,         // Method in union or intersection type
        ReadPartial = 1 << 4,         // Synthetic property present in some but not all constituents
        WritePartial = 1 << 5,         // Synthetic property present in some but only satisfied by an index signature in others
        HasNonUniformType = 1 << 6,         // Synthetic property with non-uniform type in constituents
        HasLiteralType = 1 << 7,         // Synthetic property with at least one literal type in constituents
        ContainsPublic = 1 << 8,         // Synthetic property with public constituent(s)
        ContainsProtected = 1 << 9,         // Synthetic property with protected constituent(s)
        ContainsPrivate = 1 << 10,        // Synthetic property with private constituent(s)
        ContainsStatic = 1 << 11,        // Synthetic property with static constituent(s)
        Late = 1 << 12,        // Late-bound symbol for a computed property with a dynamic name
        ReverseMapped = 1 << 13,        // Property of reverse-inferred homomorphic mapped type
        OptionalParameter = 1 << 14,        // Optional parameter
        RestParameter = 1 << 15,        // Rest parameter
        DeferredType = 1 << 16,        // Calculation of the type of this symbol is deferred due to processing costs, should be fetched with `getTypeOfSymbolWithDeferredType`
        Synthetic = SyntheticProperty | SyntheticMethod,
        Discriminant = HasNonUniformType | HasLiteralType,
        Partial = ReadPartial | WritePartial
    }

    /* @internal */
    export interface TransientSymbol extends Symbol, SymbolLinks {
        checkFlags: CheckFlags;
    }

    export const enum InternalSymbolName {
        Call = "·call", // Call signatures
        Constructor = "·constructor", // Constructor implementations
        New = "·new", // Constructor signatures
        Missing = "·missing", // Indicates missing symbol
        Type = "·type", // Anonymous type literal symbol
        Object = "·object", // Anonymous object literal declaration
        Function = "·function", // Unnamed function expression
        Resolving = "·resolving__", // Indicator symbol used to mark partially resolved type aliases
        释放_ = "~this",
        This = "本体",
        原型_ = "原型"
    }


    /** ReadonlyMap where keys are `string`s. */
    export interface ReadonlyUnderscoreEscapedMap<T> {
        get(key: string): T | undefined;
        has(key: string): boolean;
        forEach(action: (value: T, key: string) => void): void;
        readonly size: number;
        keys(): Iterator<string>;
        values(): Iterator<T>;
        entries(): Iterator<[string, T]>;
    }

    /** Map where keys are `string`s. */
    export interface UnderscoreEscapedMap<T> extends ReadonlyUnderscoreEscapedMap<T> {
        set(key: string, value: T): this;
        delete(key: string): boolean;
        clear(): void;
    }

    /** SymbolTable based on ES6 Map interface. */
    export type SymbolTable = UnderscoreEscapedMap<Symbol>;

    /** Used to track a `declare module "foo*"`-like declaration. */
    /* @internal */
    export interface PatternAmbientModule {
        pattern: Pattern;
        symbol: Symbol;
    }
    
    export const enum 枚举值种类_ {
        文本枚举_,
        数字枚举_,
    }

    /* @internal */
    export const enum NodeCheckFlags {
        TypeChecked = 0x00000001,  // Node has been type checked
        LexicalThis = 0x00000002,  // Lexical 'this' reference
        CaptureThis = 0x00000004,  // Lexical 'this' used in body
        CaptureNewTarget = 0x00000008,  // Lexical 'new.target' used in body
        SuperInstance = 0x00000100,  // Instance 'super' reference
        SuperStatic = 0x00000200,  // Static 'super' reference
        ContextChecked = 0x00000400,  // Contextual types have been assigned
        AsyncMethodWithSuper = 0x00000800,  // An async method that reads a value from a member of 'super'.
        AsyncMethodWithSuperBinding = 0x00001000,  // An async method that assigns a value to a member of 'super'.
        CaptureArguments = 0x00002000,  // Lexical 'arguments' used in body
        EnumValuesComputed = 0x00004000,  // Values for enum members have been computed, and any errors have been reported for them.
        LexicalModuleMergesWithClass = 0x00008000,  // Instantiated lexical module declaration is merged with a previous class declaration.
        LoopWithCapturedBlockScopedBinding = 0x00010000,  // Loop that contains block scoped variable captured in closure
        ContainsCapturedBlockScopeBinding = 0x00020000,  // Part of a loop that contains block scoped variable captured in closure
        CapturedBlockScopedBinding = 0x00040000,  // Block-scoped binding that is captured in some function
        BlockScopedBindingInLoop = 0x00080000,  // Block-scoped binding with declaration nested inside iteration statement
        ClassWithBodyScopedClassBinding = 0x00100000,  // Decorated class that contains a binding to itself inside of the class body.
        BodyScopedClassBinding = 0x00200000,  // Binding to a decorated class inside of the class's body.
        NeedsLoopOutParameter = 0x00400000,  // Block scoped binding whose value should be explicitly copied outside of the converted loop
        AssignmentsMarked = 0x00800000,  // Parameter assignments have been marked
        ClassWithConstructorReference = 0x01000000,  // Class that contains a binding to its constructor inside of the class body.
        ConstructorReferenceInClass = 0x02000000,  // Binding to a class constructor inside of the class's body.
    }

    /* @internal */
    export interface NodeLinks {
        flags: NodeCheckFlags;           // Set of flags specific to Node
        resolvedType?: Type;              // Cached type of type node
        resolvedEnumType?: Type;          // Cached constraint type from enum jsdoc tag
        resolvedSignature?: Signature;    // Cached signature of signature node or call expression
        resolvedSymbol?: Symbol;          // Cached name resolution result
        effectsSignature?: Signature;     // Signature with possible control flow effects
        enumMemberValue?: string | number;  // Constant value of enum member
        枚举值是小数?: boolean;
        计算的常量值?: number;
        isVisible?: boolean;              // Is this node visible
        containsArgumentsReference?: boolean; // Whether a function-like declaration contains an 'arguments' reference
        hasReportedStatementInAmbientContext?: boolean;  // Cache boolean if we report statements in ambient context
        resolvedJsxElementAttributesType?: Type;  // resolved element attributes type of a JSX openinglike element
        resolvedJsxElementAllAttributesType?: Type;  // resolved all element attributes type of a JSX openinglike element
        switchTypes?: Type[];             // Cached array of switch case expression types
        jsxNamespace?: Symbol | false;          // Resolved jsx namespace symbol for this node
        contextFreeType?: Type;          // Cached context-free type used by the first pass of inference; used when a function's return is partially contextually sensitive
        deferredNodes?: Map<Node>; // Set of nodes whose checking has been deferred
        capturedBlockScopeBindings?: Symbol[]; // Block-scoped bindings captured beneath this part of an IterationStatement
        outerTypeParameters?: TypeParameter[];  // Outer type parameters of anonymous object type
        instantiations?: Map<Type>;         // Instantiations of generic type alias (undefined if non-generic)
        resolveCall?: CallExpression;
        isExhaustive?: boolean;           // Is node an exhaustive switch statement
        方法已加入?: boolean;
        返回语句已经进行逃逸计算_?: boolean;
        限制私有成员访问?: boolean;
        合成参数?: Expression[];
        d_逃逸标志?: 逃逸计算标志_;
        d_逃逸表达式组?: ExprTypeCache[];
        d_逃逸符号组?: Symbol[];
        已经检查静态如果语句?: boolean;
        收窄前类型变量缓存?: TypeParameter,
        收窄后的类型缓存?: Type,
        d_包含隐式联合类型?: boolean;
        d_新建表达式参数排序缓存?: Map<ExprTypeCache>;
        dlang?: Map<Type>;
        dlang2?: Map<number | boolean | Signature| boolean[] | { 数量: number, 类型: Type }>;
    }

    export const enum 数字标志_ {
        无_ = 0,
        整数8_ = 1 << 0,
        整数16_ = 1 << 1,
        整数32_ = 1 << 2,
        整数64_ = 1 << 3,
        正整数8_ = 1 << 4,
        正整数16_ = 1 << 5,
        正整数32_ = 1 << 6,
        正整数64_ = 1 << 7,
        小数32_ = 1 << 8,
        小数64_ = 1 << 9,
        虚数32_ = 1 << 10,
        虚数64_ = 1 << 11,
        复数64_ = 1 << 12,
        复数128_ = 1 << 13,
        整数_ = 整数8_ | 整数16_ | 整数32_ | 整数64_ | 正整数8_ | 正整数16_ | 正整数32_ | 正整数64_,
        小数_ = 小数32_ | 小数64_,
        虚数 = 虚数32_ | 虚数64_,
    }

    export const enum 文本标志_ {
        无_ = 0,
        文本8_ = 1 << 0,
        文本16_ = 1 << 1,
        文本32_ = 1 << 2,
        ALL = 文本8_ | 文本16_ | 文本32_
    }

    export const enum 字符标志_ {
        无_ = 0,
        字符8_ = 1 << 0,
        字符16_ = 1 << 1,
        字符32_ = 1 << 2,
    }

    export const enum TypeFlags {
        无_ = 0,
        Any = 1 << 0,
        Unknown = 1 << 1,
        String = 1 << 2,
        Boolean = 1 << 3,
        Enum = 1 << 4,
        StringLiteral = 1 << 5,
        NumberLiteral = 1 << 6,
        BooleanLiteral = 1 << 7,
        EnumLiteral = 1 << 8,  // Always combined with StringLiteral, NumberLiteral, or Union
        BigIntLiteral = 1 << 9,
        Void = 1 << 10,
        Null = 1 << 11,
        Never = 1 << 12,  // Never type
        TypeParameter = 1 << 13,  // Type parameter
        Object = 1 << 14,  // Object type
        Union = 1 << 15,  // Union (T | U)
        /** 交集 */
        Intersection = 1 << 16,  // Intersection (T & U)
        Substitution = 1 << 17,  // Type parameter substitution
        数字类型_ = 1 << 18,
        只读类型_ = 1 << 19,
        恒定类型_ = 1 << 20,
        字符字面量_ = 1 << 21,
        数组类型_ = 1 << 22,
        动态数组_ = 1 << 23,
        词典类型_ = 1 << 24,
        指针类型_ = 1 << 25,
        静态二元计算_ = 1 << 26,
        共享类型_ = 1 << 27,
        区间类型_ = 1 << 28,
        数组类字面量类型_ = 1 << 29,

        /* @internal */
        AnyOrUnknown = Any | Unknown,
        限定类型_ = 只读类型_ | 恒定类型_ | 共享类型_,
        复合类型_ = 数组类型_ | 动态数组_ |  词典类型_ | 指针类型_,
        复合或限定类型_ = 限定类型_ | 复合类型_,
        /* @internal */
        Nullable =  Null,
        Literal = StringLiteral | 字符字面量_ | NumberLiteral |  BigIntLiteral | BooleanLiteral,
        Unit = Literal | Nullable,
        StringOrNumberLiteral = StringLiteral | NumberLiteral,
        /* @internal */
        StringOrNumberLiteralOrUnique = StringLiteral | NumberLiteral,
        /* @internal */
        DefinitelyFalsy = BooleanLiteral | Null,
        PossiblyFalsy = DefinitelyFalsy | Boolean,
        /* @internal */
        Intrinsic = Any | Unknown | String | Boolean | BooleanLiteral | Void | Null | Never,
        /* @internal */
        Primitive = String | 数字类型_ | Boolean | Enum | EnumLiteral | Void | Null | Literal,
        StringLike = String | StringLiteral,
        字符族_ = 字符字面量_,
        NumberLike = NumberLiteral | 数字类型_ | Enum,
        BooleanLike = Boolean | BooleanLiteral,
        EnumLike = Enum | EnumLiteral,
        VoidLike = Void,
        /* @internal */
        DisjointDomains = StringLike | NumberLike | 字符族_ | BooleanLike | VoidLike | Null,
        UnionOrIntersection = Union | Intersection,
        StructuredType = Object | Union | Intersection,
        TypeVariable = TypeParameter,
        InstantiableNonPrimitive = TypeVariable |  Substitution,
        Instantiable = InstantiableNonPrimitive,

        StructuredOrInstantiable = StructuredType | Instantiable,
        /* @internal */
        ObjectFlagsType = Nullable | Never | Object | Union | Intersection,
        // 'Narrowable' types are types where narrowing actually narrows.
        // This *should* be every type other than null, undefined, void, and never
        Narrowable = Any | Unknown | StructuredOrInstantiable | StringLike | 字符族_ | 数字类型_ |  NumberLike | BooleanLike ,
        NotUnionOrUnit = Any | Unknown | Object,
        /* @internal */
        NotPrimitiveUnion = Any | Unknown | Enum | Void | Never | StructuredOrInstantiable,
        // The following flags are aggregated during union and intersection type construction
        /* @internal */
        IncludesMask = Any | Unknown | Primitive | Never | Object | Union,
        // The following flags are used for different purposes during union and intersection type construction
        /* @internal */
        IncludesStructuredOrInstantiable = TypeParameter,
        /* @internal */
        IncludesNonWideningType = Intersection,
        // The following flag is used for different purposes by maybeTypeOfKind
        /* @internal */
        GenericMappedType = Never,
    }

    export const enum 数字字面量类型标志_ {
        无_ = 0,
        小数字面量_ = 1 << 1,
        整数字面量_ = 1 << 2,
        整数64字面量_ = 1 << 3,
        正整数64字面量_ = 1 << 4,
        正整数字面量_ = 1 << 5,
        虚数字面量_ = 1 << 6,
        虚数32字面量_ = 1 << 7,
        小数32字面量_ = 1 << 8,
        整数 = 整数字面量_| 整数64字面量_| 正整数64字面量_,
        小数 = 小数字面量_ | 小数32字面量_,
        虚数 = 虚数字面量_| 虚数32字面量_,
    }

    export const enum 文本或字符字面量标志_ {
        无_ = 0,
        字面量8_ = 1 << 1,
        字面量16_ = 1 << 2,
        字面量32_ = 1 << 3,
        ALL = 字面量8_ | 字面量16_ | 字面量32_
    }

    export type DestructuringPattern = ObjectLiteralExpression | ArrayLiteralExpression;

    // Properties common to all types
    export interface Type {
        flags: TypeFlags;                // Flags
        /* @internal */ id: number;      // Unique ID
        /* @internal */ checker: TypeChecker;
        symbol: Symbol;                  // Symbol associated with type (if any)
        pattern?: DestructuringPattern;  // Destructuring pattern represented by type (if any)
        aliasSymbol?: Symbol;            // Alias associated with type
        aliasTypeArguments?: readonly Type[];     // Alias type arguments (if any)
        /* @internal */ aliasTypeArgumentsContainsMarker?: boolean;   // Alias type arguments (if any)
        /* @internal */
        permissiveInstantiation?: Type;  // Instantiation with type parameters mapped to wildcard type
        /* @internal */
        restrictiveInstantiation?: Type; // 将类型参数映射到无约束形式的实例化
        /* @internal */
        immediateBaseConstraint?: Type;  // Immediate base constraint cache
        /* @internal */
        widened?: Type; // Cached widened form of the type
        计算的运算类型值缓存?: Type
    }

    export const enum 限定符标志_ {
        只读限定符_ = 1 << 1,
        恒定限定符_ = 1 << 2
    }

    /* @internal */
    // Intrinsic types (TypeFlags.Intrinsic)
    export interface IntrinsicType extends Type {
        intrinsicName: string;        // Name of intrinsic type
        objectFlags: ObjectFlags;
    }

    /* @internal */
    export interface NullableType extends IntrinsicType {
        objectFlags: ObjectFlags;
    }

    /* @internal */
    export interface FreshableIntrinsicType extends IntrinsicType {
        freshType: IntrinsicType;     // Fresh version of type
        regularType: IntrinsicType;   // Regular version of type
    }

    /* @internal */
    export type FreshableType = LiteralType | FreshableIntrinsicType;

    // String literal types (TypeFlags.StringLiteral)
    // Numeric literal types (TypeFlags.NumberLiteral)
    // BigInt literal types (TypeFlags.BigIntLiteral)
    export interface LiteralType extends Type {
        value: string | number | PseudoBigInt; // Value of literal
        freshType: LiteralType;                // Fresh version of type
        regularType: LiteralType;              // Regular version of type
    }

    // Unique symbol types (TypeFlags.UniqueESSymbol)
    export interface UniqueESSymbolType extends Type {
        symbol: Symbol;
        escapedName: string;
    }

    export interface StringLiteralType extends LiteralType {
        value: string;
        字面量标志: 文本或字符字面量标志_
    }

    export interface 字符字面量类型_ extends LiteralType {
        value: string;
        字面量标志: 文本或字符字面量标志_
    }

    export interface NumberLiteralType extends LiteralType {
        value: number;
        字面量标志: 数字字面量类型标志_
    }

    // Enum types (TypeFlags.Enum)
    export interface EnumType extends Type { }

    export interface 数字类型_ extends IntrinsicType {
        数字标志: 数字标志_;
    }

    export interface 整数类型_ extends 数字类型_ { }
    export interface 小数类型_ extends 数字类型_ { }

    export interface 无符号指针类型_ extends 数字类型_ { }    
    export interface 无符号正量类型_ extends 数字类型_ { }

    export interface 字节类型_ extends 数字类型_ { }

    export interface 字符类型_ extends 数字类型_ {
        字符标志: 字符标志_
    }

    export interface 复数类型_ extends 小数类型_ {
        实数类型: 小数类型_;
        虚数类型: 小数类型_;
    }

    export interface 指针类型_ extends Type {
        typeArgument: Type
    }
    

    export interface 静态二元计算类型_ extends Type {
        left: Type;
        operatorToken: BinaryOperator;
        right: Type;
    }

    export interface 只读类型_ extends Type {
        typeArgument: Type
    }

    export interface 恒定类型_ extends Type {
        typeArgument: Type
    }

    
    export interface 共享类型_ extends Type {
        typeArgument: Type
    }

    export type 限定类型_ = 只读类型_ | 恒定类型_;

    export interface 动态数组类型_ extends Type {
        typeArgument: Type
        长度?: number;
    }

    export interface 数组类型_ extends Type {
        typeArgument: Type
        长度: Type;
    }

    export interface 数组类字面量类型_ extends Type {
        常规类型: 数组类型_ | 动态数组类型_ | 词典类型_;
        新鲜类型: 数组类字面量类型_;
    }

    export interface 文本类型_ extends 动态数组类型_ , IntrinsicType{
        文本标志: 文本标志_
    }

    export interface 词典类型_ extends Type {
        键类型: Type
        值类型: Type
        容量?: number;
    }

    export interface 区间类型_ extends Type {
        开始: number;
        结束: number;
    }

    export const enum ObjectFlags {
        Class = 1 << 0,  // Class
        Interface = 1 << 1,  // Interface
        Reference = 1 << 2,  // Generic type reference
        Anonymous = 1 << 3,  // Anonymous
        Instantiated = 1 << 4,  // Instantiated anonymous or mapped type
        ObjectLiteral = 1 << 5,  // Originates in an object literal
        EvolvingArray = 1 << 6,  // Evolving array type
        ContainsSpread = 1 << 7, // Object literal contains spread operation
        MarkerType = 1 << 8, // Marker type used for variance probing
        JSLiteral = 1 << 9, // Object type declared in JS - disables errors on read/write of nonexisting members
        FreshLiteral = 1 << 10, // Fresh object literal
        ArrayLiteral = 1 << 11, // Originates in an array literal
        /* @internal */
        PrimitiveUnion = 1 << 12, // Union of only primitive types
        /* @internal */
        ContainsWideningType = 1 << 13, // Type is or contains undefined or null widening type
        /* @internal */
        ContainsObjectOrArrayLiteral = 1 << 14, // Type is or contains object literal type
        /* @internal */
        NonInferrableType = 1 << 15, // Type is or contains anyFunctionType or silentNeverType
        对象_ = 1 << 16,
        声明_ = 1 << 17,
        程序_ = 1 << 18,
        结构_ = 1 << 19,
        ClassOrInterface = Class | Interface | 对象_ | 结构_,
        /* @internal */
        RequiresWidening = ContainsWideningType | ContainsObjectOrArrayLiteral,
        /* @internal */
        PropagatingFlags = ContainsWideningType | ContainsObjectOrArrayLiteral | NonInferrableType
    }

    /* @internal */
    export type ObjectFlagsType = NullableType | ObjectType | UnionType | IntersectionType;

    // Object types (TypeFlags.ObjectType)
    export interface ObjectType extends Type {
        objectFlags: ObjectFlags;
        /* @internal */ members?: SymbolTable;             // Properties by name
        /* @internal */ properties?: Symbol[];             // Properties
        /* @internal */ callSignatures?: readonly Signature[];      // Call signatures of type
        /* @internal */ constructSignatures?: readonly Signature[]; // Construct signatures of type
    }

    /** Class and interface types (ObjectFlags.Class and ObjectFlags.Interface). */
    export interface InterfaceType extends ObjectType {
        typeParameters: TypeParameter[] | undefined;      // Type parameters (undefined if non-generic)
        outerTypeParameters: TypeParameter[] | undefined; // Outer type parameters (undefined if none)
        localTypeParameters: TypeParameter[] | undefined; // Local type parameters (undefined if none)
        iTypeParameters: TypeParameter[] | undefined; // Local type parameters (undefined if none)
        /* @internal */
        resolvedBaseTypes: BaseType[];                    // Resolved base types
    }

    export interface 对象类型_ extends InterfaceType { }

    export interface 结构类型_ extends InterfaceType { }

    export interface 类型声明类型_ extends InterfaceType { }

    // Object type or intersection of object types
    export type BaseType = ObjectType | IntersectionType | TypeVariable; // Also `any` and `object`

    export interface InterfaceTypeWithDeclaredMembers extends InterfaceType {
        声明的方法组: Symbol[];
        声明的方法表: SymbolTable;
        declaredProperties: Symbol[];                   // Declared members
        declaredCallSignatures: Signature[];            // Declared call signatures
        declaredConstructSignatures: Signature[];       // Declared construct signatures
    }

    /**
     * Type references (ObjectFlags.Reference). When a class or interface has type parameters or
     * a "this" type, references to the class or interface are made using type references. The
     * typeArguments property specifies the types to substitute for the type parameters of the
     * class or interface and optionally includes an extra element that specifies the type to
     * substitute for "this" in the resulting instantiation. When no extra argument is present,
     * the type reference itself is substituted for "this". The typeArguments property is undefined
     * if the class or interface has no type parameters and the reference isn't specifying an
     * explicit "this" argument.
     */
    export interface TypeReference extends ObjectType {
        target: GenericType;    // Type reference target
        node?: TypeReferenceNode | ArrayTypeNode;
        /* @internal */
        mapper?: TypeMapper;
        /* @internal */
        resolvedTypeArguments?: readonly Type[];  // Resolved type reference type arguments
        /* @internal */
        literalType?: TypeReference;  // Clone of type with ObjectFlags.ArrayLiteral set
    }

    export interface DeferredTypeReference extends TypeReference {
        /* @internal */
        node: TypeReferenceNode | ArrayTypeNode;
        /* @internal */
        mapper?: TypeMapper;
    }

    /* @internal */
    export const enum VarianceFlags {
        Invariant = 0,  // Neither covariant nor contravariant
        Covariant = 1 << 0,  // Covariant
        Contravariant = 1 << 1,  // Contravariant
        Bivariant = Covariant | Contravariant,  // Both covariant and contravariant
        Independent = 1 << 2,  // Unwitnessed type parameter
        VarianceMask = Invariant | Covariant | Contravariant | Independent, // Mask containing all measured variances without the unmeasurable flag
        Unmeasurable = 1 << 3,  // Variance result is unusable - relationship relies on structural comparisons which are not reflected in generic relationships
        Unreliable = 1 << 4,  // Variance result is unreliable - checking may produce false negatives, but not false positives
        AllowsStructuralFallback = Unmeasurable | Unreliable,
    }

    // Generic class and interface types
    export interface GenericType extends InterfaceType, 类型声明类型_, TypeReference {
        /* @internal */
        instantiations: Map<TypeReference>;  // Generic instantiation cache
        /* @internal */
        variances?: VarianceFlags[];  // Variance of each type parameter
    }

    export interface TupleType extends GenericType {
        minLength: number;
        hasRestElement: boolean;
        associatedNames?: string[];
    }

    export const enum 联合类型转换标志_{
        No = 1 << 1,
        Any = 1 << 2,
        String = 1 << 3,
        String_8 = 1 << 4,
        String_16 = 1 << 5,
        Int = 1 << 6,
        Float = 1 << 7,
        Bool = 1 << 8,
        Enum = 1 << 9,
        字符_ = 1 << 10,
        字符8_ = 1 << 11,
        字符16_ = 1 << 12,
    }

    export interface UnionOrIntersectionType extends Type {
        types: Type[];                    // Constituent types
        /* @internal */
        objectFlags: ObjectFlags;
        /* @internal */
        propertyCache: SymbolTable;       // Cache of resolved properties
        方法缓存: SymbolTable;
        编译器方法缓存: SymbolTable;
        /* @internal */
        解析的方法属性: Symbol[];
        /* @internal */
        resolvedProperties: Symbol[];
        /* @internal */
        resolvedBaseConstraint: Type;
        /* @internal */
        couldContainTypeVariables: boolean;
        转换标志: 联合类型转换标志_
    }

    export interface UnionType extends UnionOrIntersectionType {
        possiblePropertyCache?: SymbolTable;       // Cache of _all_ resolved properties less any from aparent members
    }

    /** 交集类型 */
    export interface IntersectionType extends UnionOrIntersectionType {
        /* @internal */
        resolvedApparentType: Type;
    }

    export type StructuredType = ObjectType | UnionType | IntersectionType;

    /* @internal */
    // An instantiated anonymous type has a target and a mapper
    export interface AnonymousType extends ObjectType {
        target?: AnonymousType;  // Instantiation target
        mapper?: TypeMapper;     // Instantiation mapper 
    }

    export interface EvolvingArrayType extends ObjectType {
        elementType: Type;      // Element expressions of evolving array type
        finalArrayType?: Type;  // Final array type of evolving array type
    }

    /* @internal */
    // Resolved object, union, or intersection type
    export interface ResolvedType extends ObjectType, UnionOrIntersectionType {
        members: SymbolTable;             // Properties by name
        方法表: SymbolTable;             // 方法 按 名称
        properties: Symbol[];             // Properties
        callSignatures: readonly Signature[];      // Call signatures of type
        constructSignatures: readonly Signature[]; // Construct signatures of type
        contextualType?: Type;
    }

    /* @internal */
    // Object literals are initially marked fresh. Freshness disappears following an assignment,
    // before a type assertion, or when an object literal's type is widened. The regular
    // version of a fresh type is identical except for the TypeFlags.FreshObjectLiteral flag.
    export interface FreshObjectLiteralType extends ResolvedType {
        regularType: ResolvedType;  // Regular version of fresh type
    }

    /* @internal */
    export interface IterationTypes {
        readonly yieldType: Type;
        readonly returnType: Type;
        readonly nextType: Type;
    }

    // Just a place to cache element types of iterables and iterators
    /* @internal */
    export interface IterableOrIteratorType extends ObjectType, UnionType {
        iterationTypesOfGeneratorReturnType?: IterationTypes;
        iterationTypesOfAsyncGeneratorReturnType?: IterationTypes;
        iterationTypesOfIterable?: IterationTypes;
        iterationTypesOfIterator?: IterationTypes;
        iterationTypesOfAsyncIterable?: IterationTypes;
        iterationTypesOfAsyncIterator?: IterationTypes;
        iterationTypesOfIteratorResult?: IterationTypes;
    }

    /* @internal */
    export interface PromiseOrAwaitableType extends ObjectType, UnionType {
        promiseTypeOfPromiseConstructor?: Type;
        promisedTypeOfPromise?: Type;
        awaitedTypeOfType?: Type;
    }

    /* @internal */
    export interface SyntheticDefaultModuleType extends Type {
        syntheticType?: Type;
    }

    export interface InstantiableType extends Type {
        /* @internal */
        resolvedBaseConstraint?: Type;
    }

    // Type parameters (TypeFlags.TypeParameter)
    export interface TypeParameter extends InstantiableType {
        /** Retrieve using getConstraintFromTypeParameter */
        /* @internal */
        constraint?: Type;        // Constraint
        /* @internal */
        default?: Type;
        /* @internal */
        target?: TypeParameter;  // Instantiation target
        /* @internal */
        mapper?: TypeMapper;     // Instantiation mapper
        /* @internal */
        // isThisType?: boolean;
        /* @internal */
        resolvedDefaultType?: Type;
    }

    export type TypeVariable = TypeParameter;

    // Type parameter substitution (TypeFlags.Substitution)
    // Substitution types are created for type parameters or indexed access types that occur in the
    // true branch of a conditional type. For example, in 'T extends string ? Foo<T> : Bar<T>', the
    // reference to T in Foo<T> is resolved as a substitution type that substitutes 'string & T' for T.
    // Thus, if Foo has a 'string' constraint on its type parameter, T will satisfy it. Substitution
    // types disappear upon instantiation (just like type parameters).
    export interface SubstitutionType extends InstantiableType {
        typeVariable: TypeVariable;  // Target type variable
        substitute: Type;            // Type to substitute for type parameter
    }

    /* @internal */
    export const enum JsxReferenceKind {
        Component,
        Function,
        Mixed
    }

    /* @internal */
    export const enum SignatureFlags {
        None = 0,
        HasRestParameter = 1 << 0,      // Indicates last parameter is rest parameter
        HasLiteralTypes = 1 << 1,       // Indicates signature is specialized
        IsOptionalCall = 1 << 2,        // Indicates signature comes from a CallChain
        isNewCall = 1 << 3,
        是虚拟的_ = 1 << 5,
        // We do not propagate `IsOptionalCall` to instantiated signatures, as that would result in us
        // attempting to add `| undefined` on each recursive call to `getReturnTypeOfSignature` when
        // instantiating the return type.
        PropagatingFlags = HasRestParameter | HasLiteralTypes,
    }

    export interface Signature {
        /* @internal */ id?: number;
        /* @internal */ flags: SignatureFlags;
        /* @internal */ checker?: TypeChecker;
        declaration?: SignatureDeclaration | JSDocSignature; // Originating declaration
        typeParameters?: readonly TypeParameter[];   // Type parameters (undefined if non-generic)
        parameters: readonly Symbol[];               // Parameters
        /* @internal */
        thisParameter?: Symbol;             // symbol of this-type parameter
        /* @internal */
        // See comment in `instantiateSignature` for why these are set lazily.
        resolvedReturnType?: Type;          // Lazily set by `getReturnTypeOfSignature`.
        resolvedTypePredicate?: TypePredicate;
        /* @internal */
        minArgumentCount: number;           // Number of non-optional parameters
        /* @internal */
        target?: Signature;                 // Instantiation target
        /* @internal */
        mapper?: TypeMapper;                // Instantiation mapper
        /* @internal */
        unionSignatures?: Signature[];      // Underlying signatures of a union signature
        /* @internal */
        erasedSignatureCache?: Signature;   // Erased version of signature (deferred)
        /* @internal */
        canonicalSignatureCache?: Signature; // Canonical version of signature (deferred)
        /* @internal */
        optionalCallSignatureCache?: Signature; // Optional chained call version of signature (deferred)
        /* @internal */
        isolatedSignatureType?: ObjectType; // A manufactured type that just contains the signature for purposes of signature comparison
        /* @internal */
        instantiations?: Map<Signature>;    // Generic signature instantiation cache
        解析的类型实参?: readonly Type[];
        解析的长度实参?: number
        解析的容量实参?: number
        d_包含隐式联合类型?: boolean;
        d_逃逸标志?: 逃逸计算标志_;
        d_逃逸符号组?: Symbol[];
    }

    export const enum IndexKind {
        String,
        Number,
    }

    /* @internal */
    export type TypeMapper = (t: TypeParameter) => Type;

    export const enum InferencePriority {
        NakedTypeVariable = 1 << 0,  // Naked type variable in union or intersection type
        HomomorphicMappedType = 1 << 1,  // Reverse inference for homomorphic mapped type
        PartialHomomorphicMappedType = 1 << 2,  // Partial reverse inference for homomorphic mapped type
        MappedTypeConstraint = 1 << 3,  // Reverse inference for mapped type
        ReturnType = 1 << 4,  // Inference made from return type of generic function
        LiteralKeyof = 1 << 5,  // Inference made from a string literal to a keyof T
        NoConstraints = 1 << 6,  // Don't infer from constraints of instantiable types
        AlwaysStrict = 1 << 7,  // Always use strict rules for contravariant inferences
        MaxValue = 1 << 8,  // Seed for inference priority tracking

        PriorityImpliesCombination = ReturnType | MappedTypeConstraint | LiteralKeyof,  // These priorities imply that the resulting type should be a combination of all candidates
        Circularity = -1,  // Inference circularity (value less than all other priorities)
    }
    /* @internal */
    export interface InferenceInfo {
        typeParameter: TypeParameter;            // Type parameter for which inferences are being made
        candidates: Type[] | undefined;          // Candidates in covariant positions (or undefined)
        contraCandidates: Type[] | undefined;    // Candidates in contravariant positions (or undefined)
        inferredType?: Type;                     // Cache for resolved inferred type
        priority?: InferencePriority;            // Priority of current inference set
        topLevel: boolean;                       // True if all inferences are to top level occurrences
        isFixed: boolean;                        // True if inferences are fixed
        是联合: boolean;
    }

    /* @internal */
    export const enum InferenceFlags {
        None = 0,  // No special inference behaviors
        NoDefault = 1 << 0,  // Infer unknownType for no inferences (otherwise anyType or emptyObjectType)
        AnyDefault = 1 << 1,  // Infer anyType for no inferences (otherwise emptyObjectType)
        SkippedGenericFunction = 1 << 2, // A generic function was skipped during inference
    }

    /**
     * Ternary values are defined such that
     * x & y is False if either x or y is False.
     * x & y is Maybe if either x or y is Maybe, but neither x or y is False.
     * x & y is True if both x and y are True.
     * x | y is False if both x and y are False.
     * x | y is Maybe if either x or y is Maybe, but neither x or y is True.
     * x | y is True if either x or y is True.
     */
    /* @internal */
    export const enum Ternary {
        False = 0,
        Maybe = 1,
        True = -1
    }

    /* @internal */
    export type TypeComparer = (s: Type, t: Type, reportErrors?: boolean) => Ternary;

    /* @internal */
    export interface InferenceContext {
        inferences: InferenceInfo[];                  // Inferences made for each type parameter
        signature?: Signature;                        // Generic signature for which inferences are made (if any)
        flags: InferenceFlags;                        // Inference flags
        compareTypes: TypeComparer;                   // Type comparer function
        mapper: TypeMapper;                           // Mapper that fixes inferences
        nonFixingMapper: TypeMapper;                  // Mapper that doesn't fix inferences
        returnMapper?: TypeMapper;                    // Type mapper for inferences from return types (if any)
        inferredTypeParameters?: readonly TypeParameter[]; // Inferred type parameters for function result
    }

    /* @internal */
    export interface WideningContext {
        parent?: WideningContext;       // Parent context
        propertyName?: string;        // Name of property in parent
        siblings?: Type[];              // Types of siblings
        resolvedProperties?: Symbol[];  // Properties occurring in sibling object literals
    }

    /* @internal */
    export const enum AssignmentDeclarationKind {
        None,
        /// this.name = expr
        ThisProperty,
        // F.name = expr
        Property
    }

    /** @deprecated Use FileExtensionInfo instead. */
    export type JsFileExtensionInfo = FileExtensionInfo;

    export interface FileExtensionInfo {
        extension: string;
        isMixedContent: boolean;
    }

    export interface DiagnosticMessage {
        key: string;
        category: DiagnosticCategory;
        code: number;
        message: string;
        reportsUnnecessary?: {};
        /* @internal */
        elidedInCompatabilityPyramid?: boolean;
    }

    /**
     * A linked list of formatted diagnostic messages to be used as part of a multiline message.
     * It is built from the bottom up, leaving the head to be the "main" diagnostic.
     * While it seems that DiagnosticMessageChain is structurally similar to DiagnosticMessage,
     * the difference is that messages are all preformatted in DMC.
     */
    export interface DiagnosticMessageChain {
        messageText: string;
        category: DiagnosticCategory;
        code: number;
        next?: DiagnosticMessageChain[];
    }

    export interface Diagnostic extends DiagnosticRelatedInformation {
        /** May store more in future. For now, this will simply be `true` to indicate when a diagnostic is an unused-identifier diagnostic. */
        reportsUnnecessary?: {};
        source?: string;
        relatedInformation?: DiagnosticRelatedInformation[];
    }
    export interface DiagnosticRelatedInformation {
        category: DiagnosticCategory;
        code: number;
        file: SourceFile | undefined;
        start: number | undefined;
        length: number | undefined;
        messageText: string | DiagnosticMessageChain;
    }
    export interface DiagnosticWithLocation extends Diagnostic {
        file: SourceFile;
        start: number;
        length: number;
    }

    export enum DiagnosticCategory {
        Warning,
        Error,
        Suggestion,
        Message
    }
    /* @internal */
    export function diagnosticCategoryName(d: { category: DiagnosticCategory }, lowerCase = true): string {
        const name = DiagnosticCategory[d.category];
        return lowerCase ? name.toLowerCase() : name;
    }

    export enum ModuleResolutionKind {
        Classic = 1,
        NodeJs = 2
    }

    export interface PluginImport {
        name: string;
    }

    export type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]> | null | TsConfigSourceFile | undefined;

    export interface CompilerOptions {
        初始?: boolean;
        帮助?: boolean;
        版本号?: boolean;
        监控?: boolean;
        构建?: boolean;
        // 编译选项
        系统?: 'win' | 'win32' | 'win64' | 'linux' | 'darwin',
        架构?: '368' | 'amd64' | 'arm';
        输出类型?: "exe" | "lib" | "dll";
        输出模式?: "debug" | "release" | "unittest";
        定义?: string[];
        字符?: string;
        彩色?: boolean;
        输出?: Path;
        源码?: string;
        全局模块路径?: string;
        启用诊断?: boolean;
        扩展的诊断组?: boolean;
        保留监控输出?: boolean;
        文件列表?: boolean;
        已输出文件列表?: boolean;
        允许未使用标签?: boolean;
        允许无法访问代码?: boolean;
        trace?: boolean;
        configFile?: TsConfigSourceFile;
        /* @internal */ configFilePath?: string;
        tsBuildInfoFile?: string;
        地区?: string;
        项目名?: string;
        [选项: string]: CompilerOptionsValue | string;
    }

    export const enum NewLineKind {
        CarriageReturnLineFeed = 0,
        LineFeed = 1
    }

    export interface LineAndCharacter {
        /** 0-based. */
        line: number;
        /*
         * 0-based. This value denotes the character position in line and is different from the 'column' because of tab characters.
         */
        character: number;
    }

    /** Either a parsed command line or a parsed tsconfig.json */
    export interface ParsedCommandLine {
        options: CompilerOptions;
        errors: Diagnostic[];
        保存时编译?: boolean;
        fileNames: string[];
        全局模块位置: string;
        wildcardDirectories?: MapLike<WatchDirectoryFlags>;
        /* @internal */ configFileSpecs?: ConfigFileSpecs;
    }

    /* @internal */
    export interface ConfigFileSpecs {
        wildcardDirectories: MapLike<WatchDirectoryFlags>;
    }

    export interface ExpandResult {
        fileNames: string[];
    }

    export const enum WatchDirectoryFlags {
        None = 0,
        Recursive = 1 << 0,
    }

    /* @internal */
    export type RequireResult<T = {}> =
        | { module: T, modulePath?: string, error: undefined }
        | { module: undefined, modulePath?: undefined, error: { stack?: string, message?: string } };

    export interface CreateProgramOptions {
        rootNames: string[];
        options: CompilerOptions;
        host?: CompilerHost;
        oldProgram?: Program;
        configFileParsingDiagnostics?: readonly Diagnostic[];
    }

    /* @internal */
    export interface CommandLineOptionBase {
        name: string;
        type: "string" | "number" | "boolean" | "object" | "list" | Map<number | string>;    // a value of a primitive type, or an object literal mapping named values to actual values
        isFilePath?: boolean;                                   // True if option value is a path or fileName
        shortName?: string;                                     // A short mnemonic for convenience - for instance, 'h' can be used in place of 'help'
        description?: DiagnosticMessage;                        // The message describing what the command line switch does
        paramType?: DiagnosticMessage;                          // The name to be used for a non-boolean option's parameter
        isTSConfigOnly?: boolean;                               // True if option can only be specified via tsconfig.json file
        isCommandLineOnly?: boolean;
        showInSimplifiedHelpView?: boolean;
        category?: DiagnosticMessage;
        strictFlag?: true;                                      // true if the option is one of the flag under strict
        affectsSourceFile?: true;                               // true if we should recreate SourceFiles after this option changes
        affectsModuleResolution?: true;                         // currently same effect as `affectsSourceFile`
        affectsBindDiagnostics?: true;                          // true if this affects binding (currently same effect as `affectsSourceFile`)
        affectsSemanticDiagnostics?: true;                      // true if option affects semantic diagnostics
        affectsEmit?: true;                                     // true if the options affects emit
        transpileOptionValue?: boolean | undefined;             // If set this means that the option should be set to this value when transpiling
        是项目配置?: boolean
    }

    /* @internal */
    export interface CommandLineOptionOfPrimitiveType extends CommandLineOptionBase {
        type: "string" | "number" | "boolean";
    }

    /* @internal */
    export interface CommandLineOptionOfCustomType extends CommandLineOptionBase {
        type: Map<number | string>;  // an object literal mapping named values to actual values
    }

    /* @internal */
    export interface TsConfigOnlyOption extends CommandLineOptionBase {
        type: "object";
        elementOptions?: Map<CommandLineOption>;
        extraKeyDiagnosticMessage?: DiagnosticMessage;
    }

    /* @internal */
    export interface CommandLineOptionOfListType extends CommandLineOptionBase {
        type: "list";
        element: CommandLineOptionOfCustomType | CommandLineOptionOfPrimitiveType | TsConfigOnlyOption;
    }

    /* @internal */
    export type CommandLineOption = CommandLineOptionOfCustomType | CommandLineOptionOfPrimitiveType | TsConfigOnlyOption | CommandLineOptionOfListType;

    /* @internal */
    export const enum Charas {
        nullCharacter = 0,
        maxAsciiCharacter = 0x7F,
        /** \n */
        lineFeed = 0x0A,              // \n
        /** \r */
        carriageReturn = 0x0D,        // \r
        lineSeparator = 0x2028,
        /** 段落分割 */
        paragraphSeparator = 0x2029,
        /** 下一行 */
        nextLine = 0x0085,

        // Unicode 3.0 space characters
        /** 各种空格 */
        space = 0x0020,   // " "
        /** 各种空格 */
        nonBreakingSpace = 0x00A0,   //
        /** 各种空格 */
        enQuad = 0x2000,
        /** 各种空格 */
        emQuad = 0x2001,
        /** 各种空格 */
        enSpace = 0x2002,
        /** 各种空格 */
        emSpace = 0x2003,
        /** 各种空格 */
        threePerEmSpace = 0x2004,
        /** 各种空格 */
        fourPerEmSpace = 0x2005,
        /** 各种空格 */
        sixPerEmSpace = 0x2006,
        /** 各种空格 */
        figureSpace = 0x2007,
        /** 各种空格 */
        punctuationSpace = 0x2008,
        /** 各种空格 */
        thinSpace = 0x2009,
        /** 各种空格 */
        hairSpace = 0x200A,
        /** 各种空格 */
        zeroWidthSpace = 0x200B,
        /** 各种空格 */
        narrowNoBreakSpace = 0x202F,
        /** 各种空格 */
        ideographicSpace = 0x3000,
        /** 各种空格 */
        mathematicalSpace = 0x205F,
        /** 各种空格 */
        ogham = 0x1680,

        _ = 0x5F,
        $ = 0x24,

        _0 = 0x30,
        _1 = 0x31,
        _2 = 0x32,
        _3 = 0x33,
        _4 = 0x34,
        _5 = 0x35,
        _6 = 0x36,
        _7 = 0x37,
        _8 = 0x38,
        _9 = 0x39,

        a = 0x61,
        b = 0x62,
        c = 0x63,
        d = 0x64,
        e = 0x65,
        f = 0x66,
        g = 0x67,
        h = 0x68,
        i = 0x69,
        j = 0x6A,
        k = 0x6B,
        l = 0x6C,
        m = 0x6D,
        n = 0x6E,
        o = 0x6F,
        p = 0x70,
        q = 0x71,
        r = 0x72,
        s = 0x73,
        t = 0x74,
        u = 0x75,
        v = 0x76,
        w = 0x77,
        x = 0x78,
        y = 0x79,
        z = 0x7A,

        A = 0x41,
        B = 0x42,
        C = 0x43,
        D = 0x44,
        E = 0x45,
        F = 0x46,
        G = 0x47,
        H = 0x48,
        I = 0x49,
        J = 0x4A,
        K = 0x4B,
        L = 0x4C,
        M = 0x4D,
        N = 0x4E,
        O = 0x4F,
        P = 0x50,
        Q = 0x51,
        R = 0x52,
        S = 0x53,
        T = 0x54,
        U = 0x55,
        V = 0x56,
        W = 0x57,
        X = 0x58,
        Y = 0x59,
        Z = 0x5a,
        /** & */
        ampersand = 0x26,             // &
        /** * */
        asterisk = 0x2A,              // *
        /** @ */
        at = 0x40,                    // @
        /** \ */
        backslash = 0x5C,             // \
        /** ` */
        backtick = 0x60,              // `
        /** | */
        bar = 0x7C,                   // |
        /** ^ */
        caret = 0x5E,                 // ^
        /** } */
        closeBrace = 0x7D,            // }
        /** ] */
        closeBracket = 0x5D,          // ]
        /** ) */
        closeParen = 0x29,            // )
        /** : */
        colon = 0x3A,                 // :
        /** , */
        comma = 0x2C,                 // ,
        /** 183 */
        中点_ = 0xB7,
        /** . */
        dot = 0x2E,                   // .
        /** " */
        doubleQuote = 0x22,           // "
        /** = */
        equals = 0x3D,                // =
        /** ! */
        exclamation = 0x21,           // !
        /** > */
        greaterThan = 0x3E,           // >
        /** # */
        hash = 0x23,                  // #
        /** < */
        lessThan = 0x3C,              // <
        /** - */
        minus = 0x2D,                 // -
        /** { */
        openBrace = 0x7B,             // {
        /** [ */
        openBracket = 0x5B,           // [
        /** ( */
        openParen = 0x28,             // (
        /** % */
        percent = 0x25,               // %
        /** + */
        plus = 0x2B,                  // +
        /** ? */
        question = 0x3F,              // ?
        /** ; */
        semicolon = 0x3B,             // ;
        /** ' */
        singleQuote = 0x27,           // '
        /** / */
        slash = 0x2F,                 // /
        /** ~ */
        tilde = 0x7E,                 // ~
        /** \b */
        backspace = 0x08,             // \b
        /** \f */
        formFeed = 0x0C,              // \f
        byteOrderMark = 0xFEFF,
        /** \t */
        tab = 0x09,                   // \t
        /** \v */
        verticalTab = 0x0B,           // \v
        定 = 0x5b9a,
        义 = 0x4e49,
        结 = 0x7ed3,
        束 = 0x675f
    }

    export interface ModuleResolutionHost {
        // TODO: GH#18217 Optional methods frequently used as non-optional

        fileExists(fileName: string): boolean;
        // readFile function is used to read arbitrary text files on disk, i.e. when resolution procedure needs the content of 'package.json'
        // to determine location of bundled typings for node module
        readFile(fileName: string): string | undefined;
        trace?(s: string): void;
        directoryExists?(directoryName: string): boolean;
        /**
         * Resolve a symbolic link.
         * @see https://nodejs.org/api/fs.html#fs_fs_realpathsync_path_options
         */
        realpath?(path: string): string;
        getCurrentDirectory?(): string;
        getDirectories?(path: string): string[];
        /* @internal */ 当前源码目录?: string;
        /* @internal */ 当前模块目录?: string;
        /* @internal */ 全局模块目录?: string;
        /* @internal */ 当前项目配置?: string;
    }

    /**
     * Represents the result of module resolution.
     * Module resolution will pick up tsx/jsx/js files even if '--jsx' and '--allowJs' are turned off.
     * The Program will then filter results based on these flags.
     *
     * Prefer to return a `ResolvedModuleFull` so that the file type does not have to be inferred.
     */
    export interface ResolvedModule {
        /** Path of the file the module was resolved to. */
        resolvedFileName: string;
        /** True if `resolvedFileName` comes from `node_modules`. */
        isExternalLibraryImport?: boolean;
    }

    export interface 模块_ extends Node {
        种类: SyntaxKind.模块_;
        模块名称: Identifier
        解析的模块目录路径: string;
        是启动模块: boolean;
        是外部支持库导入: 模块导入位置种类_;
        源文件组: ReadonlyArray<SourceFile>;
    }

    /**
     * Unique identifier with a package name and version.
     * If changing this, remember to change `packageIdIsEqual`.
     */
    export interface PackageId {
        /**
         * Name of the package.
         * Should not include `@types`.
         * If accessing a non-index file, this should include its name e.g. "foo/bar".
         */
        name: string;
        version: string;
    }

    export const enum Extension {
        K = ".k",
        TestK = ".test.k",
        Dk = ".d.k",
        Json = ".json",
        KBuildInfo = ".kbuildinfo",
        // 输出扩展
        D = ".d"
    }

    export const enum 模块导入位置种类_ {
        无_ = 0,
        外部支持库_ = 1,
        全局支持库_ = 2,
    }

    export interface 解析的模块名称_ {
        模块名称?: Identifier
        解析的模块目录路径: string
        全部源码文件名?: string[]
        是启动模块?: boolean
        是外部支持库导入?: 模块导入位置种类_
    }

    export interface ResolvedModuleWithFailedLookupLocations {
        readonly failedLookupLocations?: readonly string[];
        readonly 模块目录路径?: 解析的模块名称_ | undefined;
    }

    /* @internal */
    export type HasInvalidatedResolution = (sourceFile: Path) => boolean;

    export interface CompilerHost extends ModuleResolutionHost {
        getSourceFile(fileName: string, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined;
        getSourceFileByPath?(fileName: string, path: Path, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined;
        getCancellationToken?(): CancellationToken;
        getDefaultLibFileName(): string;
        getDefaultLibLocation?(): string;
        writeFile: WriteFileCallback;
        getCurrentDirectory(): string;
        getCanonicalFileName(fileName: string): string;
        useCaseSensitiveFileNames(): boolean;
        getNewLine(): string;
        readDirectory?(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): string[];

        /*
         * CompilerHost must either implement resolveModuleNames (in case if it wants to be completely in charge of
         * module name resolution) or provide implementation for methods from ModuleResolutionHost (in this case compiler
         * will apply built-in module resolution logic and use members of ModuleResolutionHost to ask host specific questions).
         * If resolveModuleNames is implemented then implementation for members from ModuleResolutionHost can be just
         * 'throw new Error("NotImplemented")'
         */
        resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, options: CompilerOptions): (解析的模块名称_ | undefined)[];
        getEnvironmentVariable?(name: string): string | undefined;
        /* @internal */ onReleaseOldSourceFile?(oldSourceFile: SourceFile, oldOptions: CompilerOptions, hasSourceFileByPath: boolean): void;
        /* @internal */ hasInvalidatedResolution?: HasInvalidatedResolution;
        /* @internal */ hasChangedAutomaticTypeDirectiveNames?: boolean;
        createHash?(data: string): string;
        getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined;
        执行?(命令: string, 参数: string[], op: ProcessEnvOptions ): void;

        // TODO: later handle this in better way in builder host instead once the api for tsbuild finalizes and doesn't use compilerHost as base
        /*@internal*/createDirectory?(directory: string): void;
        /*@internal*/getSymlinks?(): ReadonlyMap<string>;
    }

    /** true if --out otherwise source file name */
    /*@internal*/
    export type SourceOfProjectReferenceRedirect = string | true;

    /* @internal */
    export const enum 约束标志_ {
        d_类型,
        d_声明时的联合或通用类型,
        d_条件表达式约束父节点,
        d_赋值_联合类型,
        d_赋值_转换类型,
        d_约束_自身联合类型,
        d_加或加等转为连接约束,
        d_数组字面量表达式类型,
        d_初始空类型,
    }

    /* @internal */
    export const enum 约束标志2_ {
        d_缓存签名,
        d_是在联合类型属性访问链上,
        d_联合形参索引组,
        d_缺少初始值的数量_,
    }
    /* @internal */
    export const enum 转换标志_ {
        None = 0,
        增加peek方法_ = 1 << 1,
        增加get方法_ = 1 << 2,
        类型已断言_ = 1 << 3,
        新建联合类型_ = 1 << 4,
        静态断言_ = 1 << 5,
        增加临时变量_ = 1 << 6,
        访问联合类型属性_ = 1 << 7,
        访问联合类型方法_ = 1 << 8,
        增加null返回_ = 1 << 9,
        增加toString方法_ = 1 << 10,
        增加type属性_ = 1 << 11,
        联合类型取值_ = 1 << 12,
        联合类型取址_ = 1 << 13,
        禁止宽字符_ = 1 << 14,
        逃逸_ = 1 << 15,
        展开联合类型_ = 1 << 16,
        展开元素_ = 1 << 17,
        添加初始值_ = 1 << 18,
        增加新建声明类型_ = 1 << 19,
        访问原型_ = 1 << 20,
        增加原型或_ = 1 << 21,
        增加转换表达式_ = 1 << 22,
        名称替换_ = 1 << 23,
        增加break_ = 1 << 24,
        类型查询break_ = 1 << 25,
    }

    /* @internal */
    export const enum 转换标志2_ {
        None = 0,
        转为取址表达式_ = 1 << 1,
        转为取值表达式_ = 1 << 2,
        转为属性赋值表达式_ = 1 << 3,
        转为等于null_ = 1 << 4,
        转为不等于null_ = 1 << 5,
        转为函数指针_ = 1 << 6,
        转为父类型_ = 1 << 7,
        转为重载_ = 1 << 8,
        转为长度属性_ = 1 << 9,
        转为新建表达式_ = 1 << 10,
        禁止宽字符_ = 1 << 11,
        加或加等转为连接_ = 1 << 12,
        转为连接_ = 1 << 13,
        转为打印方法_ = 1 << 14,
        转为汇编表达式_ = 1 << 15,
        初始转为null_ = 1 << 16,
        转为call_ = 1 << 17,
        转为恒定_ = 1 << 18,
        转为to_ = 1 << 19,
        转为非限定类型_ = 1 << 20,
        转为限定类型_ = 1 << 21,
        联合类型转为单例_ = 1 << 22,
        转为$_ = 1 << 23,
        转为追加函数_ = 1 << 24,
        转为SizeOf_ = 1 << 25,
        转为typeof_ = 1 << 26,
    }

    export interface SourceMapRange extends TextRange {
        source?: SourceMapSource;
    }

    export interface SourceMapSource {
        fileName: string;
        text: string;
        /* @internal */ lineMap: readonly number[];
        skipTrivia?: (pos: number) => number;
    }

    /* @internal */
    export interface EmitNode {
        annotatedNodes?: Node[];                 // Tracks Parse-tree nodes with EmitNodes for eventual cleanup.
        flags: EmitFlags;                        // Flags that customize emit
        leadingComments?: SynthesizedComment[];  // Synthesized leading comments
        trailingComments?: SynthesizedComment[]; // Synthesized trailing comments
        commentRange?: TextRange;                // The text range to use when emitting leading or trailing comments
        sourceMapRange?: SourceMapRange;         // The text range to use when emitting leading or trailing source mappings
        tokenSourceMapRanges?: (SourceMapRange | undefined)[]; // The text range to use when emitting source mappings for tokens
        constantValue?: string | number;         // The constant value of an expression
        externalHelpersModuleName?: Identifier;  // The local name for an imported helpers module
        externalHelpers?: boolean;
        helpers?: EmitHelper[];                  // Emit helpers for the node
        startsOnNewLine?: boolean;               // If the node should begin on a new line
    }

    export const enum EmitFlags {
        None = 0,
        SingleLine = 1 << 0,                    // The contents of this node should be emitted on a single line.
        AdviseOnEmitNode = 1 << 1,              // The printer should invoke the onEmitNode callback when printing this node.
        NoSubstitution = 1 << 2,                // Disables further substitution of an expression.
        CapturesThis = 1 << 3,                  // The function captures a lexical `this`
        NoLeadingSourceMap = 1 << 4,            // Do not emit a leading source map location for this node.
        NoTrailingSourceMap = 1 << 5,           // Do not emit a trailing source map location for this node.
        NoSourceMap = NoLeadingSourceMap | NoTrailingSourceMap, // Do not emit a source map location for this node.
        NoNestedSourceMaps = 1 << 6,            // Do not emit source map locations for children of this node.
        NoTokenLeadingSourceMaps = 1 << 7,      // Do not emit leading source map location for token nodes.
        NoTokenTrailingSourceMaps = 1 << 8,     // Do not emit trailing source map location for token nodes.
        NoTokenSourceMaps = NoTokenLeadingSourceMaps | NoTokenTrailingSourceMaps, // Do not emit source map locations for tokens of this node.
        NoLeadingComments = 1 << 9,             // Do not emit leading comments for this node.
        NoTrailingComments = 1 << 10,           // Do not emit trailing comments for this node.
        NoComments = NoLeadingComments | NoTrailingComments, // Do not emit comments for this node.
        NoNestedComments = 1 << 11,
        HelperName = 1 << 12,                   // The Identifier refers to an *unscoped* emit helper (one that is emitted at the top of the file)
        ExportName = 1 << 13,                   // Ensure an export prefix is added for an identifier that points to an exported declaration with a local name (see SymbolFlags.ExportHasLocal).
        LocalName = 1 << 14,                    // Ensure an export prefix is not added for an identifier that points to an exported declaration.
        InternalName = 1 << 15,                 // The name is internal to an ES5 class body function.
        Indented = 1 << 16,                     // Adds an explicit extra indentation level for class and function bodies when printing (used to match old emitter).
        NoIndentation = 1 << 17,                // Do not indent the node.
        AsyncFunctionBody = 1 << 18,
        ReuseTempVariableScope = 1 << 19,       // Reuse the existing temp variable scope during emit.
        CustomPrologue = 1 << 20,               // Treat the statement as if it were a prologue directive (NOTE: Prologue directives are *not* transformed).
        NoHoisting = 1 << 21,                   // Do not hoist this declaration in --module system
        HasEndOfDeclarationMarker = 1 << 22,    // Declaration has an associated NotEmittedStatement to mark the end of the declaration
        Iterator = 1 << 23,                     // The expression to a `yield*` should be treated as an Iterator when down-leveling, not an Iterable.
        NoAsciiEscaping = 1 << 24,              // When synthesizing nodes that lack an original node or textSourceNode, we want to write the text on the node with ASCII escaping substitutions.
        /*@internal*/ TypeScriptClassWrapper = 1 << 25, // The node is an IIFE class wrapper created by the ts transform.
        /*@internal*/ NeverApplyImportHelper = 1 << 26, // Indicates the node should never be wrapped with an import star helper (because, for example, it imports tslib itself)
        /*@internal*/ 禁止行末分号_ = 1 << 27,
        /*@internal*/ 禁止换行_ = 1 << 28,
        /*@internal*/ 禁止宽字符_ = 1 << 29,
    }

    export interface EmitHelper {
        readonly name: string;                                          // A unique name for this helper.
        readonly scoped: boolean;                                       // Indicates whether the helper MUST be emitted in the current scope.
        readonly text: string | ((node: EmitHelperUniqueNameCallback) => string);  // ES3-compatible raw script text, or a function yielding such a string
        readonly priority?: number;                                     // Helpers with a higher priority are emitted earlier than other helpers on the node.
    }

    export interface UnscopedEmitHelper extends EmitHelper {
        readonly scoped: false;                                         // Indicates whether the helper MUST be emitted in the current scope.
        /* @internal */
        readonly importName?: string;                                   // The name of the helper to use when importing via `--importHelpers`.
        readonly text: string;                                          // ES3-compatible raw script text, or a function yielding such a string
    }

    /* @internal */
    export type UniqueNameHandler = (baseName: string, checkFn?: (name: string) => boolean, optimistic?: boolean) => string;

    export type EmitHelperUniqueNameCallback = (name: string) => string;

    /**
     * Used by the checker, this enum keeps track of external emit helpers that should be type
     * checked.
     */
    /* @internal */
    export const enum ExternalEmitHelpers {
        Extends = 1 << 0,               // __extends (used by the ES2015 class transformation)
        Assign = 1 << 1,                // __assign (used by Jsx and ESNext object spread transformations)
        Rest = 1 << 2,                  // __rest (used by ESNext object rest transformation)
        Decorate = 1 << 3,              // __decorate (used by TypeScript decorators transformation)
        Metadata = 1 << 4,              // __metadata (used by TypeScript decorators transformation)
        Param = 1 << 5,                 // __param (used by TypeScript decorators transformation)
        Awaiter = 1 << 6,               // __awaiter (used by ES2017 async functions transformation)
        Generator = 1 << 7,             // __generator (used by ES2015 generator transformation)
        Values = 1 << 8,                // __values (used by ES2015 for..of and yield* transformations)
        Read = 1 << 9,                  // __read (used by ES2015 iterator destructuring transformation)
        Spread = 1 << 10,               // __spread (used by ES2015 array spread and argument list spread transformations)
        SpreadArrays = 1 << 11,         // __spreadArrays (used by ES2015 array spread and argument list spread transformations)
        Await = 1 << 12,                // __await (used by ES2017 async generator transformation)
        AsyncGenerator = 1 << 13,       // __asyncGenerator (used by ES2017 async generator transformation)
        AsyncDelegator = 1 << 14,       // __asyncDelegator (used by ES2017 async generator yield* transformation)
        AsyncValues = 1 << 15,          // __asyncValues (used by ES2017 for..await..of transformation)
        ExportStar = 1 << 16,           // __exportStar (used by CommonJS/AMD/UMD module transformation)
        MakeTemplateObject = 1 << 17,   // __makeTemplateObject (used for constructing template string array objects)
        FirstEmitHelper = Extends,
        LastEmitHelper = MakeTemplateObject,

        // Helpers included by ES2015 for..of
        ForOfIncludes = Values,

        // Helpers included by ES2017 for..await..of
        ForAwaitOfIncludes = AsyncValues,

        // Helpers included by ES2017 async generators
        AsyncGeneratorIncludes = Await | AsyncGenerator,

        // Helpers included by yield* in ES2017 async generators
        AsyncDelegatorIncludes = Await | AsyncDelegator | AsyncValues,

        // Helpers included by ES2015 spread
        SpreadIncludes = Read | Spread,

    }

    export const enum EmitHint {
        SourceFile,          // Emitting a SourceFile
        Expression,          // Emitting an Expression
        IdentifierName,      // Emitting an IdentifierName
        MappedTypeParameter, // Emitting a TypeParameterDeclaration inside of a MappedTypeNode
        Unspecified,         // Emitting an otherwise unspecified node
        EmbeddedStatement,   // Emitting an embedded statement
    }

    /* @internal */
    export interface EmitHost extends ScriptReferenceHost, ModuleSpecifierResolutionHost {
        getSourceFiles(): readonly SourceFile[];
        useCaseSensitiveFileNames(): boolean;
        getCurrentDirectory(): string;

        isSourceFileFromExternalLibrary(file: SourceFile): boolean;
        getCommonSourceDirectory(): string;
        getCanonicalFileName(fileName: string): string;
        getNewLine(): string;

        isEmitBlocked(emitFileName: string): boolean;
        getPrependNodes(): readonly (InputFiles | UnparsedSource)[];

        writeFile: WriteFileCallback;
        getProgramBuildInfo(): ProgramBuildInfo | undefined;
        readonly redirectTargetsMap: RedirectTargetsMap;
    }

    /* @internal */
    export interface PropertyDescriptorAttributes {
        enumerable?: boolean | Expression;
        configurable?: boolean | Expression;
        writable?: boolean | Expression;
        value?: Expression;
        get?: Expression;
        set?: Expression;
    }

    export interface TransformationContext {
        /*@internal*/ getEmitResolver(): EmitResolver;
        /*@internal*/ getEmitHost(): EmitHost;

        /** Gets the compiler options supplied to the transformer. */
        getCompilerOptions(): CompilerOptions;

        /** Starts a new lexical environment. */
        startLexicalEnvironment(): void;

        /** Suspends the current lexical environment, usually after visiting a parameter list. */
        suspendLexicalEnvironment(): void;

        /** Resumes a suspended lexical environment, usually before visiting a function body. */
        resumeLexicalEnvironment(): void;

        /** Ends a lexical environment, returning any declarations. */
        endLexicalEnvironment(): Statement[] | undefined;

        /** Hoists a function declaration to the containing scope. */
        hoistFunctionDeclaration(node: FunctionDeclaration): void;

        /** Hoists a variable declaration to the containing scope. */
        hoistVariableDeclaration(node: Identifier): void;

        /** Records a request for a non-scoped emit helper in the current context. */
        requestEmitHelper(helper: EmitHelper): void;

        /** Gets and resets the requested non-scoped emit helpers. */
        readEmitHelpers(): EmitHelper[] | undefined;

        /** Enables expression substitutions in the pretty printer for the provided SyntaxKind. */
        enableSubstitution(kind: SyntaxKind): void;

        /** Determines whether expression substitutions are enabled for the provided node. */
        isSubstitutionEnabled(node: Node): boolean;

        /**
         * Hook used by transformers to substitute expressions just before they
         * are emitted by the pretty printer.
         *
         * NOTE: Transformation hooks should only be modified during `Transformer` initialization,
         * before returning the `NodeTransformer` callback.
         */
        onSubstituteNode: (hint: EmitHint, node: Node) => Node;

        /**
         * Enables before/after emit notifications in the pretty printer for the provided
         * SyntaxKind.
         */
        enableEmitNotification(kind: SyntaxKind): void;

        /**
         * Determines whether before/after emit notifications should be raised in the pretty
         * printer when it emits a node.
         */
        isEmitNotificationEnabled(node: Node): boolean;

        /**
         * Hook used to allow transformers to capture state before or after
         * the printer emits a node.
         *
         * NOTE: Transformation hooks should only be modified during `Transformer` initialization,
         * before returning the `NodeTransformer` callback.
         */
        onEmitNode: (hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void) => void;

        /* @internal */ addDiagnostic(diag: DiagnosticWithLocation): void;
    }

    export interface TransformationResult<T extends Node> {
        /** Gets the transformed source files. */
        transformed: (T | undefined)[];

        /** Gets diagnostics for the transformation. */
        diagnostics?: DiagnosticWithLocation[];

        /**
         * Gets a substitute for a node, if one is available; otherwise, returns the original node.
         *
         * @param hint A hint as to the intended usage of the node.
         * @param node The node to substitute.
         */
        substituteNode(hint: EmitHint, node: Node): Node;

        /**
         * Emits a node with possible notification.
         *
         * @param hint A hint as to the intended usage of the node.
         * @param node The node to emit.
         * @param emitCallback A callback used to emit the node.
         */
        emitNodeWithNotification(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void;

        /**
         * Clean up EmitNode entries on any parse-tree nodes.
         */
        dispose(): void;
    }

    /**
     * A function that is used to initialize and return a `Transformer` callback, which in turn
     * will be used to transform one or more nodes.
     */
    export type TransformerFactory<T extends Node> = (context: TransformationContext) => Transformer<T>;

    /**
     * A function that transforms a node.
     */
    export type Transformer<T extends Node> = (node: T) => T | undefined;

    /**
     * A function that accepts and possibly transforms a node.
     */
    export type Visitor = (node: Node) => VisitResult<Node>;

    export type VisitResult<T extends Node> = T | T[] | undefined;

    export interface Printer {
        /**
         * Print a node and its subtree as-is, without any emit transformations.
         * @param hint A value indicating the purpose of a node. This is primarily used to
         * distinguish between an `Identifier` used in an expression position, versus an
         * `Identifier` used as an `IdentifierName` as part of a declaration. For most nodes you
         * should just pass `Unspecified`.
         * @param node The node to print. The node and its subtree are printed as-is, without any
         * emit transformations.
         * @param sourceFile A source file that provides context for the node. The source text of
         * the file is used to emit the original source content for literals and identifiers, while
         * the identifiers of the source file are used when generating unique names to avoid
         * collisions.
         */
        printNode(hint: EmitHint, node: Node, sourceFile: SourceFile): string;
        /**
         * Prints a list of nodes using the given format flags
         */
        printList<T extends Node>(format: ListFormat, list: NodeArray<T>, sourceFile: SourceFile): string;
        /**
         * Prints a source file as-is, without any emit transformations.
         */
        printFile(sourceFile: SourceFile): string;
        /**
         * Prints a bundle of source files as-is, without any emit transformations.
         */
        printBundle(bundle: Bundle): string;
        /*@internal*/ writeNode(hint: EmitHint, node: Node, sourceFile: SourceFile | undefined, writer: EmitTextWriter): void;
        /*@internal*/ writeList<T extends Node>(format: ListFormat, list: NodeArray<T> | undefined, sourceFile: SourceFile | undefined, writer: EmitTextWriter): void;
        /*@internal*/ writeFile(sourceFile: SourceFile, writer: EmitTextWriter, sourceMapGenerator: SourceMapGenerator | undefined): void;
        /*@internal*/ writeBundle(bundle: Bundle, writer: EmitTextWriter, sourceMapGenerator: SourceMapGenerator | undefined): void;
        /*@internal*/ bundleFileInfo?: BundleFileInfo;
    }

    /*@internal*/
    export const enum BundleFileSectionKind {
        Prologue = "prologue",
        Prepend = "prepend",
        Text = "text",
        Internal = "internal",
        // comments?
    }

    /*@internal*/
    export interface BundleFileSectionBase extends TextRange {
        kind: BundleFileSectionKind;
        data?: string;
    }

    /*@internal*/
    export interface BundleFilePrologue extends BundleFileSectionBase {
        kind: BundleFileSectionKind.Prologue;
        data: string;
    }


    /*@internal*/
    export interface BundleFilePrepend extends BundleFileSectionBase {
        kind: BundleFileSectionKind.Prepend;
        data: string;
        texts: BundleFileTextLike[];
    }

    /*@internal*/
    export type BundleFileTextLikeKind = BundleFileSectionKind.Text | BundleFileSectionKind.Internal;

    /*@internal*/
    export interface BundleFileTextLike extends BundleFileSectionBase {
        kind: BundleFileTextLikeKind;
    }

    /*@internal*/
    export type BundleFileSection =
        BundleFilePrologue
        | BundleFilePrepend
        | BundleFileTextLike;

    /*@internal*/
    export interface SourceFilePrologueDirectiveExpression extends TextRange {
        text: string;
    }

    /*@internal*/
    export interface SourceFilePrologueDirective extends TextRange {
        expression: SourceFilePrologueDirectiveExpression;
    }

    /*@internal*/
    export interface SourceFilePrologueInfo {
        file: number;
        text: string;
        directives: SourceFilePrologueDirective[];
    }

    /*@internal*/
    export interface SourceFileInfo {
        // List of helpers in own source files emitted if no prepend is present
        helpers?: string[];
        prologues?: SourceFilePrologueInfo[];
    }

    /*@internal*/
    export interface BundleFileInfo {
        sections: BundleFileSection[];
        sources?: SourceFileInfo;
    }

    /*@internal*/
    export interface BundleBuildInfo {
        js?: BundleFileInfo;
        dts?: BundleFileInfo;
        commonSourceDirectory: string;
        sourceFiles: readonly string[];
    }

    /* @internal */
    export interface BuildInfo {
        bundle?: BundleBuildInfo;
        program?: ProgramBuildInfo;
        version: string;
    }

    export interface PrintHandlers {
        /**
         * A hook used by the Printer when generating unique names to avoid collisions with
         * globally defined names that exist outside of the current source file.
         */
        hasGlobalName?(name: string): boolean;
        /**
         * A hook used by the Printer to provide notifications prior to emitting a node. A
         * compatible implementation **must** invoke `emitCallback` with the provided `hint` and
         * `node` values.
         * @param hint A hint indicating the intended purpose of the node.
         * @param node The node to emit.
         * @param emitCallback A callback that, when invoked, will emit the node.
         * @example
         * ```ts
         * var printer = createPrinter(printerOptions, {
         *   onEmitNode(hint, node, emitCallback) {
         *     // set up or track state prior to emitting the node...
         *     emitCallback(hint, node);
         *     // restore state after emitting the node...
         *   }
         * });
         * ```
         */
        onEmitNode?(hint: EmitHint, node: Node | undefined, emitCallback: (hint: EmitHint, node: Node | undefined) => void): void;
        /**
         * A hook used by the Printer to perform just-in-time substitution of a node. This is
         * primarily used by node transformations that need to substitute one node for another,
         * such as replacing `myExportedVar` with `exports.myExportedVar`.
         * @param hint A hint indicating the intended purpose of the node.
         * @param node The node to emit.
         * @example
         * ```ts
         * var printer = createPrinter(printerOptions, {
         *   substituteNode(hint, node) {
         *     // perform substitution if necessary...
         *     return node;
         *   }
         * });
         * ```
         */
        substituteNode?(hint: EmitHint, node: Node): Node;
        /*@internal*/ onEmitSourceMapOfNode?: (hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void) => void;
        /*@internal*/ onEmitSourceMapOfToken?: (node: Node | undefined, token: SyntaxKind, writer: (s: string) => void, pos: number, emitCallback: (token: SyntaxKind, writer: (s: string) => void, pos: number) => number) => number;
        /*@internal*/ onEmitSourceMapOfPosition?: (pos: number) => void;
        /*@internal*/ onSetSourceFile?: (node: SourceFile) => void;
        /*@internal*/ onBeforeEmitNodeArray?: (nodes: NodeArray<any> | undefined) => void;
        /*@internal*/ onAfterEmitNodeArray?: (nodes: NodeArray<any> | undefined) => void;
        /*@internal*/ onBeforeEmitToken?: (node: Node) => void;
        /*@internal*/ onAfterEmitToken?: (node: Node) => void;
    }

    export interface PrinterOptions {
        removeComments?: boolean;
        newLine?: NewLineKind;
        omitTrailingSemicolon?: boolean;
        noEmitHelpers?: boolean;
        /*@internal*/ sourceMap?: boolean;
        /*@internal*/ inlineSourceMap?: boolean;
        /*@internal*/ inlineSources?: boolean;
        /*@internal*/ extendedDiagnostics?: boolean;
        /*@internal*/ onlyPrintJsDocStyle?: boolean;
        /*@internal*/ neverAsciiEscape?: boolean;
        /*@internal*/ writeBundleFileInfo?: boolean;
        /*@internal*/ recordInternalSection?: boolean;
        /*@internal*/ stripInternal?: boolean;
        /*@internal*/ Dlang_Emit?: boolean;
        /*@internal*/ 声明输出_?: boolean;
        /*@internal*/ 架构?: '368' | 'amd64' | 'arm';
        /*@internal*/ relativeToBuildInfo?: (path: string) => string;
    }

    /* @internal */
    export interface RawSourceMap {
        version: 3;
        file: string;
        sourceRoot?: string | null;
        sources: string[];
        sourcesContent?: (string | null)[] | null;
        mappings: string;
        names?: string[] | null;
    }

    /**
     * Generates a source map.
     */
    /* @internal */
    export interface SourceMapGenerator {
        getSources(): readonly string[];
        /**
         * Adds a source to the source map.
         */
        addSource(fileName: string): number;
        /**
         * Set the content for a source.
         */
        setSourceContent(sourceIndex: number, content: string | null): void;
        /**
         * Adds a name.
         */
        addName(name: string): number;
        /**
         * Adds a mapping without source information.
         */
        addMapping(generatedLine: number, generatedCharacter: number): void;
        /**
         * Adds a mapping with source information.
         */
        addMapping(generatedLine: number, generatedCharacter: number, sourceIndex: number, sourceLine: number, sourceCharacter: number, nameIndex?: number): void;
        /**
         * Appends a source map.
         */
        appendSourceMap(generatedLine: number, generatedCharacter: number, sourceMap: RawSourceMap, sourceMapPath: string, start?: LineAndCharacter, end?: LineAndCharacter): void;
        /**
         * Gets the source map as a `RawSourceMap` object.
         */
        toJSON(): RawSourceMap;
        /**
         * Gets the string representation of the source map.
         */
        toString(): string;
    }

    /* @internal */
    export interface DocumentPositionMapperHost {
        getSourceFileLike(fileName: string): SourceFileLike | undefined;
        getCanonicalFileName(path: string): string;
        log(text: string): void;
    }

    /**
     * Maps positions between source and generated files.
     */
    /* @internal */
    export interface DocumentPositionMapper {
        getSourcePosition(input: DocumentPosition): DocumentPosition;
        getGeneratedPosition(input: DocumentPosition): DocumentPosition;
    }

    /* @internal */
    export interface DocumentPosition {
        fileName: string;
        pos: number;
    }

    /* @internal */
    export interface EmitTextWriter extends SymbolWriter {
        write(s: string): void;
        writeTrailingSemicolon(text: string): void;
        writeComment(text: string): void;
        getText(): string;
        rawWrite(s: string): void;
        writeLiteral(s: string): void;
        getTextPos(): number;
        getLine(): number;
        getColumn(): number;
        getIndent(): number;
        isAtStartOfLine(): boolean;
        hasTrailingComment(): boolean;
        hasTrailingWhitespace(): boolean;
        getTextPosWithWriteLine?(): number;
    }

    export interface GetEffectiveTypeRootsHost {
        directoryExists?(directoryName: string): boolean;
        getCurrentDirectory?(): string;
    }

    export interface ModuleSpecifierResolutionHost extends GetEffectiveTypeRootsHost {
        useCaseSensitiveFileNames?(): boolean;
        fileExists?(path: string): boolean;
        readFile?(path: string): string | undefined;
        /* @internal */
        getProbableSymlinks?(files: readonly SourceFile[]): ReadonlyMap<string>;
        /* @internal */
        getGlobalTypingsCacheLocation?(): string | undefined;
        /* @internal */ 当前源码目录: string;
        /* @internal */ 当前模块目录: string;
        /* @internal */ 全局模块目录: string;
        /* @internal */ 当前项目配置: string;
    }

    // Note: this used to be deprecated in our public API, but is still used internally
    /* @internal */
    export interface SymbolTracker {
        // Called when the symbol writer encounters a symbol to write.  Currently only used by the
        // declaration emitter to help determine if it should patch up the final declaration file
        // with import statements it previously saw (but chose not to emit).
        trackSymbol?(symbol: Symbol, enclosingDeclaration: Node | undefined, meaning: SymbolFlags): void;
        reportInaccessibleThisError?(): void;
        reportPrivateInBaseOfClassExpression?(propertyName: string): void;
        reportInaccessibleUniqueSymbolError?(): void;
        reportLikelyUnsafeImportRequiredError?(specifier: string): void;
        moduleResolverHost?: ModuleSpecifierResolutionHost & { getSourceFiles(): readonly SourceFile[], getCommonSourceDirectory(): string };
        trackExternalModuleSymbolOfImportTypeNode?(symbol: Symbol): void;
    }

    export interface TextSpan {
        start: number;
        length: number;
    }

    export interface TextChangeRange {
        span: TextSpan;
        newLength: number;
    }

    /* @internal */
    export interface DiagnosticCollection {
        // Adds a diagnostic to this diagnostic collection.
        add(diagnostic: Diagnostic): void;

        // Returns the first existing diagnostic that is equivalent to the given one (sans related information)
        lookup(diagnostic: Diagnostic): Diagnostic | undefined;

        // Gets all the diagnostics that aren't associated with a file.
        getGlobalDiagnostics(): Diagnostic[];

        // If fileName is provided, gets all the diagnostics associated with that file name.
        // Otherwise, returns all the diagnostics (global and file associated) in this collection.
        getDiagnostics(): Diagnostic[];
        getDiagnostics(fileName: string): DiagnosticWithLocation[];

        reattachFileDiagnostics(newFile: SourceFile): void;
    }

    // SyntaxKind.SyntaxList
    export interface SyntaxList extends Node {
        _children: Node[];
    }

    export const enum ListFormat {
        None = 0,

        // Line separators
        SingleLine = 0,                 // Prints the list on a single line (default).
        MultiLine = 1 << 0,             // Prints the list on multiple lines.
        PreserveLines = 1 << 1,         // Prints the list using line preservation if possible.
        LinesMask = SingleLine | MultiLine | PreserveLines,

        // Delimiters
        NotDelimited = 0,               // There is no delimiter between list items (default).
        BarDelimited = 1 << 2,          // Each list item is space-and-bar (" |") delimited.
        AmpersandDelimited = 1 << 3,    // Each list item is space-and-ampersand (" &") delimited.
        CommaDelimited = 1 << 4,        // Each list item is comma (",") delimited.
        SpaceAndCommaDelimited = 1 << 22,
        AsteriskDelimited = 1 << 5,     // Each list item is asterisk ("\n *") delimited, used with JSDoc.
        DelimitersMask = BarDelimited | AmpersandDelimited | CommaDelimited | AsteriskDelimited,

        AllowTrailingComma = 1 << 6,    // Write a trailing comma (",") if present.

        // Whitespace
        Indented = 1 << 7,              // The list should be indented.
        SpaceBetweenBraces = 1 << 8,    // Inserts a space after the opening brace and before the closing brace.
        SpaceBetweenSiblings = 1 << 9,  // Inserts a space between each sibling node.

        // Brackets/Braces
        Braces = 1 << 10,                // The list is surrounded by "{" and "}".
        Parenthesis = 1 << 11,          // The list is surrounded by "(" and ")".
        AngleBrackets = 1 << 12,        // The list is surrounded by "<" and ">".
        SquareBrackets = 1 << 13,       // The list is surrounded by "[" and "]".
        BracketsMask = Braces | Parenthesis | AngleBrackets | SquareBrackets,

        OptionalIfUndefined = 1 << 14,  // Do not emit brackets if the list is undefined.
        OptionalIfEmpty = 1 << 15,      // Do not emit brackets if the list is empty.
        Optional = OptionalIfUndefined | OptionalIfEmpty,

        // Other
        PreferNewLine = 1 << 16,        // Prefer adding a LineTerminator between synthesized nodes.
        NoTrailingNewLine = 1 << 17,    // Do not emit a trailing NewLine for a MultiLine list.
        NoInterveningComments = 1 << 18, // Do not emit comments between each node

        NoSpaceIfEmpty = 1 << 19,       // If the literal is empty, do not add spaces between braces.
        SingleElement = 1 << 20,
        双换行 = 1 << 21,

        // Precomputed Formats
        Modifiers = SingleLine | SpaceBetweenSiblings | NoInterveningComments,
        HeritageClauses = SingleLine | SpaceBetweenSiblings,
        SingleLineTypeLiteralMembers = SingleLine | SpaceBetweenBraces | SpaceBetweenSiblings,
        MultiLineTypeLiteralMembers = MultiLine | Indented | OptionalIfEmpty,

        TupleTypeElements = CommaDelimited | SpaceBetweenSiblings | SingleLine,
        UnionTypeConstituents = BarDelimited | SpaceBetweenSiblings | SingleLine,
        IntersectionTypeConstituents = AmpersandDelimited | SpaceBetweenSiblings | SingleLine,
        ObjectBindingPatternElements = SingleLine | AllowTrailingComma | SpaceBetweenBraces | CommaDelimited | SpaceBetweenSiblings | NoSpaceIfEmpty,
        ArrayBindingPatternElements = SingleLine | AllowTrailingComma | CommaDelimited | SpaceBetweenSiblings | NoSpaceIfEmpty,
        ObjectLiteralExpressionProperties = PreserveLines | CommaDelimited | SpaceBetweenSiblings | SpaceBetweenBraces | Indented | Braces | NoSpaceIfEmpty,
        ArrayLiteralExpressionElements = PreserveLines | CommaDelimited | SpaceBetweenSiblings | AllowTrailingComma | Indented | Braces,
        D_ArrayLiteralExpressionElements= PreserveLines | CommaDelimited | SpaceBetweenSiblings | AllowTrailingComma | Indented | SquareBrackets,
        CommaListElements = CommaDelimited | SpaceBetweenSiblings | SingleLine,
        CallExpressionArguments = CommaDelimited | SpaceBetweenSiblings | SingleLine | Parenthesis,
        NewExpressionArguments = CommaDelimited | SpaceBetweenSiblings | SingleLine | Parenthesis | OptionalIfUndefined,
        TemplateExpressionSpans = SingleLine | NoInterveningComments,
        SingleLineBlockStatements = SpaceBetweenBraces | SpaceBetweenSiblings | SingleLine,
        MultiLineBlockStatements = Indented | MultiLine,
        VariableDeclarationList = CommaDelimited | SpaceBetweenSiblings | SingleLine,
        SingleLineFunctionBodyStatements = SingleLine | SpaceBetweenSiblings | SpaceBetweenBraces,
        MultiLineFunctionBodyStatements = MultiLine,
        ClassHeritageClauses = SingleLine,
        ClassMembers = Indented | MultiLine,
        InterfaceMembers = Indented | MultiLine,
        EnumMembers = CommaDelimited | Indented | MultiLine,
        CaseBlockClauses = Indented | MultiLine,
        NamedImportsOrExportsElements = CommaDelimited | SpaceBetweenSiblings | AllowTrailingComma | SingleLine | SpaceBetweenBraces | NoSpaceIfEmpty,
        JsxElementOrFragmentChildren = SingleLine | NoInterveningComments,
        JsxElementAttributes = SingleLine | SpaceBetweenSiblings | NoInterveningComments,
        CaseOrDefaultClauseStatements = Indented | MultiLine | NoTrailingNewLine | OptionalIfEmpty,
        HeritageClauseTypes = CommaDelimited | SpaceBetweenSiblings | SingleLine,
        SourceFileStatements = MultiLine | NoTrailingNewLine,
        Decorators = MultiLine | Optional,
        TypeArguments = CommaDelimited | SpaceBetweenSiblings | SingleLine | AngleBrackets | Optional,
        TypeParameters = CommaDelimited | SpaceBetweenSiblings | SingleLine | AngleBrackets | Optional,
        
        D_TypeArguments = CommaDelimited | SpaceBetweenSiblings | SingleLine | Parenthesis | Optional,
        D_TypeParameters = CommaDelimited | SpaceBetweenSiblings | SingleLine | Parenthesis | Optional,
        Parameters = CommaDelimited | SpaceBetweenSiblings | SingleLine | Parenthesis,
        IndexSignatureParameters = CommaDelimited | SpaceBetweenSiblings | SingleLine | Indented | SquareBrackets,
        JSDocComment = MultiLine | AsteriskDelimited,
    }

    export interface UserPreferences {
        readonly disableSuggestions?: boolean;
        readonly quotePreference?: "auto" | "double" | "single";
        readonly includeCompletionsForModuleExports?: boolean;
        readonly includeAutomaticOptionalChainCompletions?: boolean;
        readonly includeCompletionsWithInsertText?: boolean;
        readonly importModuleSpecifierPreference?: "relative" | "non-relative";
        /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */
        readonly importModuleSpecifierEnding?: "minimal" | "index" | "js";
        readonly allowTextChangesInNewFiles?: boolean;
        readonly providePrefixAndSuffixTextForRename?: boolean;
    }    

    /** Represents a bigint literal value without requiring bigint support */
    export interface PseudoBigInt {
        negative: boolean;
        base10Value: string;
    }
}
namespace ts {    
    export const enum SignatureKind {
        Call,
        Construct,
        全参默认_
    }
    export interface KlangJson_ {
        名称?: string;
        版本?: string;
        依赖?: { [x: string]: string }
    }

}